Becky has asked for the wisdom of the Perl Monks concerning the following question:
A sample of my code is:
This has no effect at all - it's still waiting for the slow-running program to before displaying 'your results will be emailed to you'. What am I doing wrong?if (($FORM{'email'} =~ /\w+\@\w+/)&&($FORM{'sequence'} ne "")){ my $sequence=$FORM{'sequence'}; my $window=$FORM{'window_size'}; my $email=$FORM{'email'}; my $pid = fork(); if($pid==0){ #child process - want this to carry on in background #call subroutine that posts this info to slow-running program &get_disorder($sequence, $window, $email); } else{ #parent process - want to give use back a webpage NOW print "Your results will be emailed to you."; } }
I also keep seeing things about zombie children but I'm not clear how to prevent them.
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: forking in a cgi script
by merlyn (Sage) on Mar 25, 2004 at 15:18 UTC | |
by Becky (Beadle) on Mar 25, 2004 at 15:46 UTC | |
Re: forking in a cgi script
by tommycahir (Acolyte) on Mar 25, 2004 at 15:44 UTC | |
by Marcello (Hermit) on Mar 26, 2004 at 10:12 UTC | |
Re: forking in a cgi script
by calin (Deacon) on Mar 25, 2004 at 18:29 UTC | |
Re: forking in a cgi script
by ccn (Vicar) on Mar 27, 2004 at 10:41 UTC |