>>>>> "Mike" == Mike Miller <[EMAIL PROTECTED]> writes:

Mike> All:

Mike> I have a CGI script which forks off a new process to perform lengthy
Mike> operations, and then uses the parent to display a short message in
Mike> the browser indicating that the process has begun.  

Mike> However, I'm finding that the browser tries to continue loading until
Mike> the child has completed.  How can I stop this (or can I?)  I want the
Mike> parent to print the message and exit, but the browser waits for the
Mike> child anyway...  UGH...

Mike>    use strict;
Mike>    use CGI qw(:all);
Mike>    $|++;
   
Mike>    my $pid = fork;
Mike>    if ($pid == 0) {    # CHILD

            close STDOUT;

Mike>       sleep 30;
Mike>       # Do stuff that takes a long time.
Mike>       exit;
Mike>    }
 
Mike>    print header;
Mike>    print start_html;
Mike>    print "<h1>Running command.  Thanks.</h1>\n";
Mike>    exit;

Mike> I'm guessing I need to send some special kind of headers to the server
Mike> or something, but I really haven't a clue.  Any ideas?

Mike> Thanks,

Mike> -Mike



-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to