Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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
Re^2: Perl wait vs Unix ksh wait (oops)
by tye (Cardinal) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-12-25 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls