[Catalyst] Re: System call problem

Tomas Doran bobtfish at bobtfish.net
Wed Dec 24 10:14:43 GMT 2008


On 19 Dec 2008, at 16:21, Florent Angly wrote:

> Well, after some more fiddling and researching, I figured this  
> problem out.
> Using the modified command:
>> system(@formatdb_cmd) == 0 or die("Could not run command:  
>> @formatdb_cmd\nReturn status: $?\nMessage: $!");
> I found out that my error message is:
>> No child processes
> It turns out that in Catalyst, $SIG{CHLD} = 'IGNORE'. Setting $SIG 
> {CHLD} to 'DEFAULT' makes the system() calls return the proper status.

I assume that you do this like this:

{
     local $SIG{CHLD} = 'DEFAULT';
     system('my system command');
}

Does doing something similar around $class->handle_request; in  
Catalyst/Engine/HTTP.pm make it work in a generic way so that you  
don't have to do this hack locally?

And is there any chance you could write a simple test which shows the  
return values being lost, so that we can properly fix this in  
Catalyst, with appropriate regression testing?

Cheers
t0m




More information about the Catalyst mailing list