in reply to Re: How do I run an Infinite loop with a CGI?
in thread How do I run an Infinite loop with a CGI?
Forking off a copy of the Web server run-time environment and all of its associated baggage is rather inefficient, since you'd likely use very little of this. Starting a new process means that your "daemon" script can begin with a clean slate, no open file handles, allocated memory, and such.my $error = system("/usr/local/bin/my.daemon"); if ($error) { print "<I>Problem launching server. (Error code $error)</I>\n"; } else { print "<I>Server started.</I>\n"; }
|
|---|