Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: calling one cgi script from another

by Anonymous Monk
on Feb 21, 2007 at 17:51 UTC ( [id://601374]=note: print w/replies, xml ) Need Help??


in reply to Re: calling one cgi script from another
in thread calling one cgi script from another

I've been reading up on this and have implemented the fork:
if ($pid = fork) { print "I am parent\n"; } elsif (defined $pid) { print "I am child\n"; sleep 5; print "Child is done\n"; } else { die "Major error: $!"; } print "PID: $$\n";
However I need the child to run in the background, for the browser to be freed up on printing the parent. Can anyone point me in the right direction, please?

Replies are listed 'Best First'.
Re^3: calling one cgi script from another
by derby (Abbot) on Feb 21, 2007 at 17:57 UTC

      Actually, I don't want to keep an eye on it - I just need ti to carry on until it's finished.

      Effectively I need system "long_running_code with parameters &"; but not in the shell as I need to pass arguments

        I'm sure if you *read* the article, the only diff you'll notice is what you do in the parent after the fork (create a meta-refresh page like merlyn does or another landing page like you do).

        -derby

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://601374]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-25 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found