diff options
Diffstat (limited to '3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c')
-rw-r--r-- | 3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c b/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c index ee8bb2a9a8b..4ab14789a38 100644 --- a/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c +++ b/3rdparty/libuv/test/test-pipe-close-stdout-read-stdin.c @@ -53,6 +53,7 @@ TEST_IMPL(pipe_close_stdout_read_stdin) { int pid; int fd[2]; int status; + char buf; uv_pipe_t stdin_pipe; r = pipe(fd); @@ -64,6 +65,8 @@ TEST_IMPL(pipe_close_stdout_read_stdin) { * The write side will be closed by the parent process. */ close(fd[1]); + /* block until write end of pipe is closed */ + read(fd[0], &buf, 1); close(0); r = dup(fd[0]); ASSERT(r != -1); |