call external script - fork

Discussion in 'Perl Misc' started by cerr, Mar 24, 2010.

  1. cerr

    cerr Guest

    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
     
    cerr, Mar 24, 2010
    #1
    1. Advertising

  2. cerr

    cerr Guest

    On Mar 24, 4:17 pm, Ben Morrow <> wrote:
    > Quoth cerr <>:
    >
    >
    >
    > > 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
     
    cerr, Mar 25, 2010
    #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. Eric Snow

    os.fork and pty.fork

    Eric Snow, Jan 8, 2009, in forum: Python
    Replies:
    0
    Views:
    602
    Eric Snow
    Jan 8, 2009
  2. Sven Fischer
    Replies:
    2
    Views:
    591
    Roedy Green
    Mar 9, 2012
  3. Blue®
    Replies:
    10
    Views:
    334
    Thomas 'PointedEars' Lahn
    May 27, 2005
  4. Mellow Crow
    Replies:
    6
    Views:
    441
    Richard Cornford
    Nov 4, 2005
  5. lovecreatesbeauty
    Replies:
    2
    Views:
    399
    lovecreatesbeauty
    Jul 20, 2011
Loading...

Share This Page