The "make test" on MinGW+MSys generates a failure in testpipe. The failure happens in wait_pipe() because apr_file_pipe_timeout_set() returns an error when trying to set the timeout. By checking the code in APR, actually the timeout can be set only if the pipe has been open as overlapped object and when running at least on an NT platform. Replacing: rv = apr_file_pipe_create(&readp, &writep, p); with: rv = apr_file_pipe_create_ex(&readp, &writep, APR_FULL_NONBLOCK, p); allowed to set the timeout correctly. Unfortunately, the test still fails later because the next apr_file_pipe_wait() seems to return APR_ENOTIMPL.
Ugh, are we building a Win9x flavor of APR out of mingw/msys? I ask because that code was never maintained the best, and is definitely suboptimal due to API restrictions!
the issue just seems to be the way that apr_file_pipe_create/_ex are written there's no overlapped structure created unless apr_file_pipe_create_ex() was called, and told that at least one handle was non-blocking without that happening, apr_file_pipe_timeout_set() refuses to support a non-zero timeout Carlo's debug step to call rv = apr_file_pipe_create_ex(&readp, &writep, APR_FULL_NONBLOCK, p); was proof that we aren't in the Win9x abyss
That's right, now I'm remembering, this behavior is 'as expected', it wasn't possible on win9x at all. Thus the introduction of _ex(), so this 'behavior is by design'. In dropping support for win9x, it sure seems possible to normalize all of this for rev 2.0 apr.
If I remember well... on Win9x and ME there are no problems to do asynchronous operations with communications devices (like serial ports), named pipes and mailslots, when they are opened with the FILE_FLAG_OVERLAPPED flag. Compared to its successors, Windows 95 had also more restrictions than Windows 98 and ME because missing ReadFileEx/WriteFileEx functions, but it seems they are not used here. I'm sure that these operating systems cannot do asynchronous disk accesses (with the only exception of ASPI), but I believe that the other resources should work fine.