Re: multiple system commands

2006-03-10 Thread Jay Savage
On 3/10/06, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: > Hi > > thanks for the reply. I can't use the if condition twice > as the code after the outside system command is supposed > to get executed only after completion of former. > > about the installation, yes i am using the tarball to install it

Re: multiple system commands

2006-03-10 Thread Jay Savage
On 3/10/06, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: > i got the following error while trying to install spork > > Checking if your kit is complete... > Looks good > Warning: prerequisite version 0 not found. > Could not eval ' > package ExtUtils::MakeMaker::_version; > no

Re: multiple system commands

2006-03-10 Thread Saurabh Singhvi
Hi thanks for the reply. I can't use the if condition twice as the code after the outside system command is supposed to get executed only after completion of former. about the installation, yes i am using the tarball to install it. system flags -O3, gentoo system. thanks Saurabh On 3/10/06, Ja

Re: multiple system commands

2006-03-10 Thread Jay Savage
On 3/10/06, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: > also i tried using this > > my $child = fork (); > > unless ($child) { > sleep 5; > print "child\n"; > } > print 2; > > block of code, but i had a problem. Instead of the print statements, > i had 2 system calls on

Re: multiple system commands

2006-03-10 Thread Saurabh Singhvi
also i tried using this my $child = fork (); unless ($child) { sleep 5; print "child\n"; } print 2; block of code, but i had a problem. Instead of the print statements, i had 2 system calls one inside the block and one outside. Now, as was expected, the fork allowed t

Re: multiple system commands

2006-03-10 Thread Saurabh Singhvi
i got the following error while trying to install spork Checking if your kit is complete... Looks good Warning: prerequisite version 0 not found. Could not eval ' package ExtUtils::MakeMaker::_version; no strict; local $VERSION; $VERSION=undef; do {

Re: multiple system commands

2006-03-07 Thread JupiterHost.Net
use Acme::Spork; print 1; spork( sub { sleep 5; print "child\n" }, ); print "parent\n"; and the standard: my $child = fork (); unless ($child) { sleep 5; print "child\n"; } print "parent\n" if $child;

Re: multiple system commands

2006-03-07 Thread Jay Savage
On 3/5/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: > > > Saurabh Singhvi wrote: > > thanks for all the help!!!> > > > I am gonna try out all of them and settle with the best :). > > You'll likely want Acme::Spork's spork() because: > > a) You can run zillions of processes at the same time withou

Re: multiple system commands

2006-03-05 Thread JupiterHost.Net
Saurabh Singhvi wrote: thanks for all the help!!! I am gonna try out all of them and settle with the best :). You'll likely want Acme::Spork's spork() because: a) You can run zillions of processes at the same time without waiting for them (the fork recommendation will do one at a time as i

Re: multiple system commands

2006-03-04 Thread JupiterHost.Net
Saurabh Singhvi wrote: Hi Hello, I have a script which executes some system commands one after the other. But as can be seen from what is written the limitation is that they are executed one after the other. Now, I want them to run simultaneously. So, how should i go about doing it?? ht

Re: multiple system commands

2006-03-04 Thread Jeff Pang
Call the 'exec' in your scripts please.for example,you want to execute three system commands: call0,call1,call2,you could write: for (my $i=0;$i<3;$i++){ die "can't fork $!" unless defined my $child = fork(); unless ($child){ exec "call$i"; die "can't exec call$i"; } }