APM: Spawning processes

Brian Michalk michalk at awpi.com
Wed Jul 21 09:35:01 CDT 2004


Thanks.  That was pretty close.  It turned out to need something like this:

    347           exec("./$0 2>&1 &");
    348           exit 0;         

-----Original Message-----
From: Ian Ragsdale [mailto:ian at SKYLIST.net] 
Sent: Tuesday, July 20, 2004 3:42 PM
To: Brian Michalk
Cc: austin at mail.pm.org
Subject: Re: APM: Spawning processes

I think just calling "exec($0, @ARGV);" will do what you want.

Ian

On Jul 20, 2004, at 3:36 PM, Brian Michalk wrote:

> I have come across a scenario where the shell environment changes.  
> When
> this happens, I could clean up all of my network sockets, and restore
> everything, but it would be much simpler to just restart.
>
> What would the preferred method be?  The respawned process needs to 
> detach,
> because we will be killing the parent.
>
> Something like:
> System "run_my_program.pl &";
> Exit 0;
>
> Maybe a fork()?????
>
> _______________________________________________
> Austin mailing list
> Austin at mail.pm.org
> http://mail.pm.org/mailman/listinfo/austin




More information about the Austin mailing list