in reply to Surprised by limitation of Win32 "system(1" hack
though if I need to go to the bother of calling waitpid etc. I will probably just bite the bullet and use Win32::Process instead.
Why? Why is "the bother of calling waitpid" so onerous?
This just ran to completion in 10 seconds or so(Note:1000):
use strict; use warnings; $| = 1; my $cmd = qq{$^X -le "print 'pid=', \$\$"}; for my $i ( 1 .. 1000 ) { print "$i: run $cmd ---------\n"; my $rc = system( 1, $cmd ); waitpid( $rc, 0 ); }
|
|---|