Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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;'

Comment on Re: Perl wait vs Unix ksh wait
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 lurking in the Monastery: (6)
As of 2015-10-13 23:17 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (316 votes), past polls