
jon+catalyst at youramigo
Oct 28, 2007, 12:21 AM
Post #6 of 6
(1684 views)
Permalink
|
|
Re: Fix for system() returning -1 on dev server
[In reply to]
|
|
On Sat, 2007-10-27 at 12:46 -0400, Andy Grundman wrote: > > optional_http-server.t + live_fork.t already tests for this and was > > failing the tests for system() and backticks return codes. Post-patch > > it passes system() and still fails backticks exit code. > > Hmm, even with the patch both the system and backticks tests fail for > me. The output is the same with or without the patch: > Well, I checked with vanilla 5.8.8, vanilla 5.9.5 and RHEL5 perl-5.8.8-24, and on all systems I got the same - prepatch both system () and backticks fail, and postpatch system() is fixed but backticks still fails. Nevertheless, I thought I'd have a look at the backticks problem as well, and implement the double-fork approach - the main process forks and reaps its child inline, which happens without delay because all the child does is fork again and exit, so there is no need for any SIG{CHLD} handling at all. Attached is suggested patch against svn 7075, with which I get all tests passing on optional_http-server and optional_http-server-restart. (And yes, my app still works too!) Please give it a try and see if you have more success. -- Jon
|