in reply to Re: mod_perl and $?
in thread mod_perl and $?

Thank you for your response.

Yes, I am doing the >> 8. And the "incorrectness" of $? only seems to happen after that Apache child has serviced quite a number of requests. If I change the module or do anything else that forces Apache to kill off the children containing this handler $? returns the correct value for a limited period of time. Note that this effect still occurs even if I set $? = 0 directly before qx()'ing

The other interesting thing you mention is the effect an installed handler for SIGCHLD has. I do happen to have a handler for SIGCHLD installed. I will try resetting SIGCHILD i.e. $SIG{CHLD} = '' next.

Cheers!
--habit

Replies are listed 'Best First'.
Re^3: mod_perl and $?
by tachyon (Chancellor) on Nov 05, 2004 at 04:47 UTC

    Also useful to know is that $? is reset on each wait or pipe close, overwriting the old value.