Prev: FAQ 8.15 How do I set the time and date?
Next: FAQ 9.10 How do I decode or create those %-encodings on the web?
From: cerr on 24 Mar 2010 18:46 Hi There, I would like to start one of my perl scripts out of the one i'm running and it should have it's parallel process and be totally decoupled from the currently running script. I tried around with system("/my/other/script.pl ARG1 ARG2"); and exec("/my/other/script.pl ARG1 ARG2"); with and without & at the back but nothing quite did it for me the way i imagined that. What am i doing wrongly? Thanks, -- roN
From: Ben Morrow on 24 Mar 2010 19:17 Quoth cerr <ron.eggler(a)gmail.com>: > > I would like to start one of my perl scripts out of the one i'm > running and it should have it's parallel process and be totally > decoupled from the currently running script. I tried around with > system("/my/other/script.pl ARG1 ARG2"); and exec("/my/other/script.pl > ARG1 ARG2"); with and without & at the back but nothing quite did it > for me the way i imagined that. What am i doing wrongly? What have you tried exactly, and how is it not doing what you want? system("... &") will allow the command you run to continue after your main process exits, and the main process will not be notified when it exits; it is still partially connected to the original process, though, since it's still in the same process group and still in the same session. Both of these can be fixed, if necessary, but you need to be sure they are what is causing your problem. Ben
From: cerr on 24 Mar 2010 20:08
On Mar 24, 4:17 pm, Ben Morrow <b...(a)morrow.me.uk> wrote: > Quoth cerr <ron.egg...(a)gmail.com>: > > > > > I would like to start one of my perl scripts out of the one i'm > > running and it should have it's parallel process and be totally > > decoupled from the currently running script. I tried around with > > system("/my/other/script.pl ARG1 ARG2"); and exec("/my/other/script.pl > > ARG1 ARG2"); with and without & at the back but nothing quite did it > > for me the way i imagined that. What am i doing wrongly? > > What have you tried exactly, and how is it not doing what you want? > > system("... &") will allow the command you run to continue after your > main process exits, and the main process will not be notified when it > exits; it is still partially connected to the original process, though, > since it's still in the same process group and still in the same > session. Both of these can be fixed, if necessary, but you need to be > sure they are what is causing your problem. Yeah, I got it going properly now with system("...&"); That in fact was just a confusion on my side, so nevermind but anyways, thank you for attempting to help! :) -- roN |