I'd like to be able to start a perl script that takes up to 20 minutes to run from a web page. The user will click a button, which will run a cgi script that starts the perl script in the background. The cgi script would print that the job has started and the browser connection will cease to be. Here is what I have so far. The background job is started, but the browser keeps the connection to the server open and sits there "transfering from server." How can I get this to work? Thanks for any pointers, ideas, help.
#!/usr/bin/perl use warnings; use strict; use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); print header; print start_html; my $pid; if ($pid = fork) { print "parent process\n"; } else { print "child process\n"; print end_html; exec('/scripts/run/fsscan 2>&1'); exit 0; }
In reply to Run perl script from web page by smist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |