From e342dbed1e87916aef984ca5d25f5ab93af46ebc Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 23 Dec 2013 12:13:58 -0800 Subject: fix other build error --- src/io/write_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/io') 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]; } -- cgit v1.2.3-60-g2f50