Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2018-05-20 13:08 GMT
Find Nodes?
    Voting Booth?