For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > May 2004 > Want to kill current process then restart









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Want to kill current process then restart
Brian

2004-05-23, 11:31 pm

I have a perl/tk app where I want to supply a button that will kill
the current process and then restart the application. I was thinking
that I could just fork off a child process at start time and then wait
for the child to finish and then fork off another child. The quesion
is how to go about doing this?

Thanks,
brian
John W. Krahn

2004-05-24, 2:31 am

Brian wrote:
>
> I have a perl/tk app where I want to supply a button that will kill
> the current process and then restart the application. I was thinking
> that I could just fork off a child process at start time and then wait
> for the child to finish and then fork off another child. The quesion
> is how to go about doing this?


Assuming that $0 hasn't been modified and is available from the CWD:

exec $0;



John
--
use Perl;
program
fulfillment
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com