in reply to Re: system return -1
in thread system return -1

I had read the documentation before posing the question.
As far as Perl is concerned it is failing with "no child processes". This implies that the called script via the system fork is not exiting cleanly. This is not the case however becuase as demonstrated in the code I put forward the shell script is exiting with a 0 and it also contains an exit 0 in the script.
I'm not sure how to overcome this problem becuase the documentation says
an implicit fork (2) is done with system , backquotes, or opening a pr +ocess as a filehandle. Be very careful to end the child code with an +exit
How do I stop it from producing a "no child process" error ?

Replies are listed 'Best First'.
Re^3: system return -1
by ikegami (Patriarch) on Oct 25, 2010 at 14:23 UTC
    $! is "no child processes"? That would indicate you are reaping the children elsewhere. (It doesn't have anything to do with exiting cleanly or not.) Are you using $SIG{CHLD}='IGNORE';, wait or waitpid anywhere?