Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: FastCGI - updating settings

by goeb (Pilgrim)
on Mar 04, 2010 at 08:54 UTC ( #826661=note: print w/replies, xml ) Need Help??


in reply to FastCGI - updating settings

The following should do the trick, it will exit if the mtime of $file (edit: relative to the script's start time, of course...) is less than zero, ie. $file has been modified after the script's start time:
while (my $cgi = new CGI::Fast ()) { # process the current request... exit if -M $file < 0; }
Then let the webserver take care of restarting it. (Note that the exit call is placed after the processing of a request, since the while loop is only entered after a new request is made to the script, immediate exit could break the connection. This leaves one request being processed with the old settings.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://826661]
help
Chatterbox?
[marto]: good morning all
[prospect]: Good morning ! More Perl learning today, Man that subroutines chapter is tough.
[marto]: tutorials-> Subroutines may be of interest

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2017-07-24 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (348 votes). Check out past polls.