Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Perl wait vs Unix ksh wait

by tuxz0r (Pilgrim)
on Oct 31, 2007 at 18:25 UTC ( #648324=note: print w/ replies, xml ) Need Help??

in reply to Perl wait vs Unix ksh wait

But, if you are "stuck" on Unix (which is really a good thing), you can refer to this node (or many others if you search for fork, exec and wait). Basically, you will fork off each independent process, collecting their process ids and then have the parent script wait until it receives a SIGCHLD from each one signaling it has finished.

echo S 1 [ Y V U | perl -ane 'print reverse map { $_ = chr(ord($_)-1) } @F;'

Replies are listed 'Best First'.
Re^2: Perl wait vs Unix ksh wait (oops)
by tye (Sage) on Oct 31, 2007 at 18:57 UTC

    The node you linked to doesn't properly handle fork failing. That is typical.

    See my reply in this thread for a solution that does handle fork failing and for more information about how it still isn't as nice as system(1,...).

    - tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://648324]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2016-07-23 12:56 GMT
Find Nodes?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?

    Results (220 votes). Check out past polls.