Want to kill current process then restart

Discussion in 'Perl Misc' started by Brian, May 24, 2004.

  1. Brian

    Brian Guest

    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
    Brian, May 24, 2004
    #1
    1. Advertising

  2. 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
    John W. Krahn, May 24, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian
    Replies:
    1
    Views:
    760
    Mothra
    May 25, 2004
  2. python
    Replies:
    13
    Views:
    583
    Mike Meyer
    Nov 10, 2005
  3. X-Centric
    Replies:
    11
    Views:
    772
    Howard
    Jul 1, 2005
  4. Replies:
    0
    Views:
    273
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    280
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page