gerry has asked for the wisdom of the Perl Monks concerning the following question:
@command = ("/bin/nohup /mevs/$version/bin/mevs", "/mevs/$version/data +/config_data/mevs2.cfg", "online"); system(join " ", @command, "&"); # restart pgm in background
However, when I issue the "ps -ef" command the "&" shows up as part of the command line display. I'm wondering now if the "&" is being considered as another $ARGV instead of requesting the program be run in the background. I use the above syntax instead the following:
@command = ("/bin/nohup /mevs/$version/bin/mevs", "/mevs/$version/data +/config_data/mevs2.cfg", "online", "&"); system(@command);
Is the first approach the correct way to submit a job to run in the background?
I am just a little confused and any help you can provide is greatly appreciated. Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Submitting program to background from perl
by Zaxo (Archbishop) on Mar 02, 2005 at 20:02 UTC | |
|
Re: Submitting program to background from perl
by Fletch (Bishop) on Mar 02, 2005 at 19:38 UTC | |
|
Re: Submitting program to background from perl
by phaylon (Curate) on Mar 02, 2005 at 20:06 UTC | |
|
exec, not system
by jhourcle (Prior) on Mar 03, 2005 at 00:38 UTC | |
by gerry (Sexton) on Mar 03, 2005 at 19:33 UTC | |
|
Re: Submitting program to background from perl
by Anonymous Monk on Mar 02, 2005 at 21:52 UTC |