It's curious that you don't want any error checking (in which case you could use Watch Long Processes Through CGI).
I can see two approaches.
Spawn a task to do the work.
use POSIX qw( setsid ); print "Content-Type: text/plain\n"; print "\n"; print "1"; my $pid = fork(); exit(0) if !defined($pid) || $pid; open STDIN, '</dev/null' or die; open STDOUT, '>/dev/null' or die; open STDERR, '>&STDOUT' or die; setsid(); ... handle request ...
Assign the work to an existing task or to a cron job.
... queue request in a file or database ... print "Content-Type: text/plain\n"; print "\n"; print "1";
In reply to Re^3: GET a file without waiting for the result?
by ikegami
in thread GET a file without waiting for the result?
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |