[Catalyst-dev] Fix for system() returning -1 on dev server

Jon Schutz jon+catalyst at youramigo.com
Sun Oct 28 07:21:04 GMT 2007


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: catalyst-http-patch-v2.txt
Type: text/x-patch
Size: 2453 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst-dev/attachments/20071028/adf22df2/catalyst-http-patch-v2.bin


More information about the Catalyst-dev mailing list