lightoverhead has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks:
I have a question regarding how to obtain pids for each command I put in background.
foreach(1..10) { system("$cmd &"); #... somehow to get pid of this system() call, $pid print "$cmd submitted with PID: $pid\n"; }
I am wondering how to to get PID of each system() call.
As I put them in background, so they return right way, I hope I can get the pid for each of the sumbitted $cmd
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: is it possible to get PID for a command running background?
by VincentK (Beadle) on Dec 09, 2013 at 20:52 UTC | |
by taint (Chaplain) on Dec 09, 2013 at 21:42 UTC | |
Re: is it possible to get PID for a command running background?
by ikegami (Patriarch) on Dec 10, 2013 at 04:38 UTC | |
by lightoverhead (Pilgrim) on Dec 10, 2013 at 17:01 UTC | |
by ikegami (Patriarch) on Dec 11, 2013 at 15:12 UTC |
Back to
Seekers of Perl Wisdom