Perl CGI script to not wait for a subprocess to complete
- by Tyug
Is it possible to continue displaying a CGI script's HTML without waiting for a child process to complete, yet the child process should stay alive when the CGI script is complete.
Here's what I have,
-- Display HTML page
# html page set up... so header/other stuff
#the -c, -h are params are just params
system("perl subprocess.pm -c params -h 1 &");
#actually print the html page setup
...
For some weird reason, it waits for the subprocess to finish before it outputs the html page even though I included the asynchronous system call for linux. It doesn't render the page immediately. Is it possible to print the html page without waiting for the subprocess to finish?