Problem:
libuv is compiled with -Wunused-result.
In two tests, read() is used for ordering and the
rc is ignored because it doesn't matter.
But -Wunused-result causes warnings in these cases.
Fix:
Provide a (very generous) check on the rc of read()
in these cases.
PR-URL: https://github.com/libuv/libuv/pull/1956
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
If the child process reaches uv_run before the parent has closed the
write end of the pipe the test fails with the following output:
Assertion failed in test/test-pipe-close-stdout-read-stdin.c
on line 86: uv_run(uv_default_loop(), UV_RUN_NOWAIT) == 0
Assertion failed in test/test-pipe-close-stdout-read-stdin.c
on line 97: WIFEXITED(status) && WEXITSTATUS(status) == 0
This is mainly seen on AIX, but does not mean that it can not occur on
linux. This change causes the child process to be blocked until the
write end of the pipe is properly closed. See 'man 7 pipe'[0] for
more detail.
[0]http://linux.die.net/man/7/pipe
PR-URL: https://github.com/libuv/libuv/pull/688
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
PR-URL: https://github.com/libuv/libuv/pull/67
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This fixes a SmartOS specific issue that happens when reading from
a stream that is the reading end of a pipe that has been closed by
the parent process.
In this case, a UV__POLLHUP event would be set on the stream and would
prevent the event loop from closing it. As a result, the event loop
would think there are stil handles open, and leave the process
hanging.
Fixes#1419.