in reply to Perl script to wait for a program to finish

The user's program is probably sending a SIGCHLD signal to your perl program which is killing it.    You probably need to ignore this signal.

  • Comment on Re: Perl script to wait for a program to finish

Replies are listed 'Best First'.
Re^2: Perl script to wait for a program to finish
by renzosilv (Novice) on Sep 28, 2011 at 14:01 UTC
    How do I go about doing that ?

      perldoc perlipc

      You may also choose to assign the strings 'IGNORE' or 'DEFAULT' + as the handler, in which case Perl will try to discard the signal or d +o the default thing. On most Unix platforms, the "CHLD" (sometimes also known as "CL +D") signal has special behavior with respect to a value of 'IGNORE'. Sett +ing $SIG{CHLD} to 'IGNORE' on such a platform has the effect of not + creating zombie processes when the parent process fails to "wait()" on i +ts child processes (i.e. child processes are automatically reaped). Cal +ling "wait()" with $SIG{CHLD} set to 'IGNORE' usually returns "-1" o +n such platforms.
      Ask Google... http://www.schwer.us/journal/2008/02/06/perl-sigchld-ignore-system-and-you/