Think you mean foreground or background. 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 20 September 2007 15:59
To: lerameur; beginners@perl.org
Subject: Re: unix commands


--- lerameur <[EMAIL PROTECTED]> wrote:

> Hello,
> 
>  I want to write a perl script that invokes unix command. Some of the 
> command can take a long time to process, I have many commands I want 
> to invoke. Lets say the first command can take  one minute to process,  
> how can I make sure the second command will not start until the irst 
> one is complete,
> 

Hi,

This is really descided by your application,not perl itself.
say you do something like,
system("/path/bin/httpd");
no one then would know when apache will exit.

if your first command is working in front-end,system() can block until the
command is finished,then you execute the second command.otherwise if your
command is working in backend like httpd,to control its runtime is hard.you
may need to get its process id,and always monitor this id,until the process
id is not alive,you execute the follow commands.





 
____________________________________________________________________________
________
Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
http://au.docs.yahoo.com/mail/unlimitedstorage.html


--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/



This e-mail is from the PA Group.  For more information, see
www.thepagroup.com.

This e-mail may contain confidential information.  Only the addressee is
permitted to read, copy, distribute or otherwise use this email or any
attachments.  If you have received it in error, please contact the sender
immediately.  Any opinion expressed in this e-mail is personal to the sender
and may not reflect the opinion of the PA Group.

Any e-mail reply to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to