Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: How to call two programs simultaneously from a running program

by repellent (Priest)
on Aug 11, 2008 at 05:40 UTC ( #703556=note: print w/replies, xml ) Need Help??


in reply to Re: How to call two programs simultaneously from a running program
in thread How to call two programs simultaneously from a running program

After forking, we still have to wait/waitpid for the child process to end in order to avoid zombies, unless we employ the double-fork technique.

Instead, try this: system "perl B.pl &"; system "perl C.pl &"

Reference: How do I start a process in the background?
  • Comment on Re^2: How to call two programs simultaneously from a running program
  • Download Code

Replies are listed 'Best First'.
Re^3: How to call two programs simultaneously from a running program
by GrandFather (Sage) on Aug 11, 2008 at 21:17 UTC

    fork is a somewhat cross platform. system "... &" is rather system dependent. There is no telling what the OP is using of course and there is a fair chance that using & will do the trick for the OP.


    Perl reduces RSI - it saves typing

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://703556]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2018-07-22 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (454 votes). Check out past polls.

    Notices?