Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Locking out a CGI script whilst it runs

by jasonk (Parson)
on Feb 18, 2003 at 20:04 UTC ( [id://236376]=note: print w/replies, xml ) Need Help??


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)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://236376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-09-16 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.