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 Sun, 09 Sep 2007 09:15:12 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-09 02:15 -------
I'll address your second bullet first in comment #12 above;

> 2. handle inheritance wasn't being reset correctly.  The 2nd arg to
> SetHandleInformation is a mask, so the following doesn't reset the handle to
> un-inheritable if stdin_reset is zero:
>
>  SetHandleInformation(GetStdHandle(STD_INPUT_HANDLE),stdin_reset, stdin_reset);

I missed your point as applies to either the current 1.2.11 code, or my
proposed code fragement above - just above the reset you should find;

            if (stdin_reset)
                SetHandleInformation(GetStdHandle(STD_INPUT_HANDLE),
                                     stdin_reset, stdin_reset);

and you are right, stdin_reset will *not* toggle an uninheritable
handle to inheritable; we determined stdin_reset from the parent
processes' STD_INPUT_HANDLE current value.  We mask it & INHERIT so
that we examine and toggle none of the other possible handle flags.

If stdin_reset is 0 - there is nothing to set back to INHERITED - then
the SetHandleInformation is not called, and the current STD_INPUT_HANDLE
enters and leaves apr_proc_create unmolested.  Right?


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