Hi all, I've finally got around to using 1.6 and have come across a problem with testpipe on Windows (built using MSYS2 and mingw32/64): $ testall.exe -v testpipe testpipe : Line 161: expected <0>, but saw <22> FAILED 1 of 9 Failed Tests Total Fail Failed % =================================================== testpipe 9 1 11.11%
The problem does not occur with v1.5.1 (last version I used). The problem happens when it tries to set a timeout with apr_file_pipe_timeout_set which fails with APR_EINVAL because the pipe was opened blocking. The pipes should not be blocking since they were set up with: apr_procattr_io_set(procattr, APR_CHILD_BLOCK, APR_CHILD_BLOCK, APR_CHILD_BLOCK); However, it appears a bug was introduced in file_io/win32/pipe.c in r1736523 (and r1734816 in trunk). That change introduced the new function apr_file_pipe_create_pools() and refactored apr_file_pipe_create_ex() to use it as follows: APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in, apr_file_t **out, apr_int32_t blocking, apr_pool_t *p) { return apr_file_pipe_create_pools(in, out, APR_FULL_BLOCK, p, p); } So apr_file_pipe_create_ex() now ignores the "blocking" parameter passed to it and only creates blocking pipes. If "APR_FULL_BLOCK" is replaced with "blocking" then everything appears to work as expected and the testpipe tests all pass. As a diff: ================== --- pipe.c-orig 2017-09-26 11:52:24.509293200 +0100 +++ pipe.c 2017-09-26 13:07:15.441143200 +0100 @@ -76,7 +76,7 @@ apr_int32_t blocking, apr_pool_t *p) { - return apr_file_pipe_create_pools(in, out, APR_FULL_BLOCK, p, p); + return apr_file_pipe_create_pools(in, out, blocking, p, p); } APR_DECLARE(apr_status_t) apr_file_pipe_create_pools(apr_file_t **in, ================== Cheers, Steve