in reply to Perl wait vs Unix ksh wait
Well, on a Real™ operating system, you could replace that with:
my %child; for my $cmd ( "command1", "command2", "command3" ) { $child{system(1,$cmd)}= $cmd; } while( %child ) { my $cmd= delete $child{wait()}; warn "$cmd failed: $?\n" if 0 != $?; }
But if you are stuck on Unix, then it becomes much harder to "spawn" properly, unfortunately. I'll see if I can write up the helper function for that, but I suspect somebody else will beat me to it.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl wait vs Unix ksh wait (spawn)
by tye (Sage) on Oct 31, 2007 at 18:22 UTC | |
|
Re^2: Perl wait vs Unix ksh wait (spawn)
by jettero (Monsignor) on Oct 31, 2007 at 18:20 UTC | |
by tye (Sage) on Oct 31, 2007 at 18:51 UTC |