summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/io/write_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/io/write_test.cpp b/src/io/write_test.cpp
index 36ab556..36ffe88 100644
--- a/src/io/write_test.cpp
+++ b/src/io/write_test.cpp
@@ -13,7 +13,11 @@ static
int pipew(int& rfd)
{
int pfd[2];
- pipe2(pfd, O_NONBLOCK);
+ if (-1 == pipe2(pfd, O_NONBLOCK))
+ {
+ rfd = -1;
+ return -1;
+ }
rfd = pfd[0];
return pfd[1];
}