in reply to Detect Process End
system "/bin/ps -p $a" does not return a true when the process is still running
Specifically, system doesn't return at all while the child process is still running. Also, it doesn't provide the output in a variable, which I think you want. Try open(HANDLE, "/bin/ps -p $a |") if you wish to get the info as ps prints it, or use backticks ($info = `/bin/ps -p $a`) if you just want the output when ps is done running.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Detect Process End
by rcolman (Acolyte) on Nov 27, 2004 at 05:14 UTC | |
by NetWallah (Canon) on Nov 27, 2004 at 05:30 UTC | |
by Anonymous Monk on Nov 29, 2004 at 02:13 UTC |