[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Self-updating Perl script ("exec" equivalent)?



I need some code that will make a script terminate itself and launch
another script. My search through the archives of this list didn't turn up
a solution, even though it looks like the topic has come up before.

Here's the scenario, in case it makes a difference:
I run a lab where client computers run tests. A client script runs
continuously on each machine,  periodically checking for the existence of a
"job" file on a server. The job file contains information needed to start
and control the tests. 

Sometimes, the job file contains a command that tells the client script to
run another script that performs various tasks on the client computer
before returning to normal operation. This allows me to make changes on the
client machines just by writing a script, putting it on the server along
with job file that tells the client script to run it. 

For most housekeeping tasks, this works great. However, I also need,
sometimes, to update the client script itself, which means that client
script has to terminate and be re-launched. This was easy to implement in
Windows using "exec," but I can't find a way to do it in MacPerl.

thanks in advance,
Tom Sackett
tsackett@adobe.com

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org