View Ticket
Ticket Hash: 11622724e5b46818396db583ac839391f70c8d64
Title: implementation of function “popen2” on win32
Status: Open Type: Feature_Request
Severity: Priority:
Subsystem: Resolution: Open
Last Modified: 2010-08-26 09:53:14
Version Found In: current trunk
I use this function in winhttp.c to improve windows http server performance.

see my attachment.

Have a fun!

anonymous added on 2010-08-26 09:08:18:
Notice: The child processes must set "stdin" and "stdout" to binary mode when use pipe to pass binary data.

    _setmode(0, _O_BINARY);
    _setmode(1, _O_BINARY);

anonymous added on 2010-08-26 09:53:14:
And I have a suggestion that the subroutine "pclose2" is prone to confuse.

Such as in winhttp.c, if the parent does not close pOut in time, the child will block on reading the pipe until his parent close the pOut.