in reply to Locking out a CGI script whilst it runs

My initial reaction is "why is this a CGI?", that seems like a solution looking for a problem.

That aside, what I would do is have the cgi script launch a process in the background, rather than having the cgi wait for it to finish. That way you could use lockfiles, and allow the subprocess to run even if the browser stops.

  • Comment on Re: Locking out a CGI script whilst it runs

Replies are listed 'Best First'.
Re: Re: Locking out a CGI script whilst it runs
by extremely (Priest) on Feb 18, 2003 at 21:18 UTC
    I know why it is a CGI. There was already a webserver running on the port, good programmers built the daemon to stay running, it handles the port it answers unambiguously, it provides a simple interface that can be accessed with just a couple lines of perl without understanding any of the high magic of networking, the webserver has authentication/authorization built in, and he already knew how to do it.

    Unless you a are a masochist who gets off on network internals, why wouldn't you call a remote script using CGI? :)

    --
    $you = new YOU;
    honk() if $you->love(perl)