develooper Front page | perl.perl6.language | Postings from June 2002

System calls/spawning new processes

Thread Next
From:
Fahmawi, Yazan
Date:
June 26, 2002 08:15
Subject:
System calls/spawning new processes
Message ID:
E81CDB637D61D511A92800D0B7E4C9D80A788B23@gsny30e.ny.fw.gs.com
Hi all,

I am writing a perl script, call it 'Master.pl'. I am also writing another
script, 'Peon.pl'. I'm using perl5 on a Unix system, and what I'd like to do
is allow Master.pl to spawn multiple instances of Peon.pl, as if someone was
executing it from the command prompt with an ampersand (&). I've tried
something like 

	system("perl", "Peon.pl", "arg1", "arg2", "&");

from withing Master.pl, though that hasn't yielded the results I need
(instead of runing Peon.pl and returning immediately from the 'system' call,
it waits for Peon.pl to finish executing before returning). Does anyone know
how I might be able to execute Peon.pl as a separate process that can run in
parallel with Master.pl (and possibly other copies of Peon.pl)?

thanks a lot,
Yazan

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About