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 Wed, 12 Sep 2007 08:10:48 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 wrowe@apache.org  2007-09-12 01:10 -------
"I don't see a way to solve this for both log.c and fastcgi, short of changes to
both APR's win proc.c and changes to httpd.   Any ideas?"

I guess I have to step back and ask a few things.  Typical cgi looks like

  httpd.exe [parent] (happens to set up stdout \device\null, stderr to errorlog)
   \-- httpd.exe [child] (gets a stdin from parent for passing handles)
        \-- prog.exe (stdin/out set up to pipe cgi, errors to errorlog)

That's simple enough so far.  Now mod_fcgid spawns a long-lived app serving
process, and wants to pass that app no stdout/stderr.

What would be wrong with mod_fcgid invoking

apr_procattr_io_set(fcgid_procattr, APR_FULL_BLOCK, APR_NO_FILE, APR_NO_FILE);

for it's procattr structure, and then invoking the fcgi app with those flags?

What happens when we add a new flag to win32, at least, is that previous apr
versions would treat those as APR_FULL_BLOCK, creating pipes that are never
used.  With the next apr release forward, they would be INVALID_FILE_HANDLE
notations to avoid passing the parent's current stdhandles, or any other handle.

To accomplish the same but using apr_procattr_stdin_set() instead, just first
call this;

apr_procattr_io_set(fcgid_procattr,  APR_NO_FILE, APR_NO_FILE, APR_NO_FILE);

and it will mark those as not-inherited, although stdin_set would override.

Wouldn't this solve the case of using apr file_io?  The compiled modules aren't
using apr themselves, are they?  Or if they are, it doesn't matter, since they
aren't being recompiled and they dealt with INVALID_FILE_HANDLES just fine,
before.

I agree we don't want to rebuild every fcgi application out there.  Obviously
mod_fcgid needs a recompile.  I'm trying to find the shortest path.

-- 
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