> -----Original Message-----
> From: insomniak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 08, 2001 9:26 AM
> To: [EMAIL PROTECTED]
> Subject: Re: using system?
> 
> 
> Hi all,
> Thanks for your reply, but I think i should rephase what I am 
> trying to do.
> 
> Basically im writting a script that runs a series of commands using
> system(). But I need to know that the previous command has 
> completed before
> running the next. I had thought that using "wait" might do 
> the trick but I
> do not have any examples to go from. the only exmaple I've 
> seen is in the
> perl camel book -  $sig{CHLD} = sub {wait } and being a bit 
> green on perl I
> not sure if this will help me or how I would use it :(.
> 
> If what I'm asking is not possible - fair enough, but any 
> help on this is
> much-o appricated.

>From perldoc -f system:

  =item system LIST

  =item system PROGRAM LIST

  Does exactly the same thing as "C<exec LIST>", except that a fork is done
  first, and the parent process waits for the child process to complete.

system() already waits, so why do you think you need to wait?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to