in reply to Inexplicable ECHILD

If anywhere, this is where an ECHILD would make more sense.

Such a statement only makes sense if $! is scoped to be different between your signal handler and your main loop. They are both in the same process. $! is global to the process. And signals handlers get run asynchronously compared to the main program flow.

Add local($!); to your signal handler.

- tye        

Replies are listed 'Best First'.
Re^2: Inexplicable ECHILD ("global")
by williams (Beadle) on Aug 11, 2010 at 01:02 UTC
    That fixes it. I also localized $? for the same reason. Ignoring SIGCHLD fixes it too, but I have code to run in the reaper.

    Thanks,

    Jim