in reply to Re: Detect Process End
in thread Detect Process End

After I send a kill 15, $a, it takes a long time for the process to end -- like 20 to 30 minutes. So, I need to pause program execution until the process REALLY ends.

I have not tried( kill( 0, $pid ) ) { ... }

Replies are listed 'Best First'.
Re^3: Detect Process End
by rcolman (Acolyte) on Nov 27, 2004 at 05:50 UTC
    What is kill 0 (instead of kill 15)???
      kill 0 basically asks that PID if it's still alive or not. If you try a kill 0 on a PID that doesn't exist, you'll get false back. Be careful, though. Because Unix PIDs are recycled, there's no guarantee that the process that currently has the PID that you're looking at is the process that you think it is...

      thor

      Feel the white light, the light within
      Be your own disciple, fan the sparks of will
      For all of us waiting, your kingdom will come