I have a problem with cgi programming- I want a cgi script to start a
background process and finish.
I've got two scripts:
dontwait:
#! /bin/sh
wait.pl &
echo "Content-type: text/html"
echo
echo "Ok"
#############
and wait:
#! /usr/bin/perl
for (i=1;i<=200000;i++) {
#do a lot of computations
g=sqrt(2);
###########Quote:}
When I start the dontwait script from the shell it exits immediately while
wait does it's computations. But when I start dontwait as a cgi-script:
http://localhost/cgi-bin/dontwait it doesn't exit until wait finishes. How
should I force dontwait to exit as soon as it starts wait?