apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43329] - apr_proc_create behavior change
Date Fri, 07 Sep 2007 20:13:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43329>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43329





------- Additional Comments From Tom.Donovan@acm.org  2007-09-07 13:13 -------
Handles which are NULL in the attr arg (i.e. attr->child_xxx is NULL) are
*expected* to have invalid handles in the created process, not zero handles.

Most (all?) Windows fastcgi programs check stdin, stdout, & stderr to recognize
a fastcgi environment on Windows.

Unfortunately, it is not the Apache module which checks this (like mod_fcgid),
but the target executable.  FastCGI targets are usually linked with the
venerable old FastCGI Development kit (http://www.fastcgi.com/#TheDevKit
libfcgi.dll) or similar.  The code to recognize a fastcgi environment is
unfortunately baked into all the target exe's.

See http://www.fastcgi.com/cvs/fcgi2/libfcgi/os_win32.c
line 387 for a typical test:

    if((GetStdHandle(STD_OUTPUT_HANDLE) == INVALID_HANDLE_VALUE) &&
       (GetStdHandle(STD_ERROR_HANDLE)  == INVALID_HANDLE_VALUE) &&
       (GetStdHandle(STD_INPUT_HANDLE)  != INVALID_HANDLE_VALUE) ) 
    {
      ... do the fastcgi Windows pipe stuff ...

No similar issues on Unix (AFAIK).  stdin/out/err are always 0,1,2 and can be
used the same whether it is a fastcgi environment or not.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message