From: Ray Strode Date: Tue, 11 Dec 2012 19:37:16 +0000 (-0500) Subject: utils: don't create pipes non-blocking X-Git-Tag: 0.9.0~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1140c1936adfd074d2a4db886cb26129e14f3a7;p=thirdparty%2Fplymouth.git utils: don't create pipes non-blocking The daemonizing code depends on its pipe io being blocking. The other user of ply_open_unidirectional_pipe will work with blocking or non blocking io. This commit changes ply_open_unidirectional_pipe to create blocking pipes. This started causing failures with commit 9ec69929 since it replaced broken code (passing O_NONBLOCK to fcntl(fd, F_SETFD.. instead of F_SETFL) with working code. --- diff --git a/src/libply/ply-utils.c b/src/libply/ply-utils.c index ed9219c2..83334852 100644 --- a/src/libply/ply-utils.c +++ b/src/libply/ply-utils.c @@ -87,7 +87,7 @@ ply_open_unidirectional_pipe (int *sender_fd, assert (sender_fd != NULL); assert (receiver_fd != NULL); - if (pipe2 (pipe_fds, O_CLOEXEC | O_NONBLOCK) < 0) + if (pipe2 (pipe_fds, O_CLOEXEC) < 0) return false; *sender_fd = pipe_fds[1];