Max Diehn wrote the following on 01/07/2005 11:21 AM :
> Hi Lionel,
>
> in Net::Server, it is said:
>
> "Each of the server personalities (except for INET), support
> restarting via a HUP signal (see "kill -l"). When a HUP is received,
> the server will close children (if any), make sure that sockets are
> left open, and re-exec using the same commandline parameters that
> initially started the server."
>
> Making sure that sockets are left open - that's what I wanted.
> But this happens, when I try HUPing sqlgrey:
>
> 2005/01/07-10:37:28 Server closing!
> 2005/01/07-10:37:28 HUP'ing server
> Process Backgrounded
> 2005/01/07-10:37:29 Pid_file already exists for running process
> 26902)... aborting at line 268 in file
> /usr/lib/perl5/site_perl/5.8.0/Net/Server.pm
> 2005/01/07-10:37:29 Server closing!
>
> sqlgrey source says:
>
> if (defined $opt{kill}) {
> ...
> unlink $pidfile;
> exit;
> }
>
> but in case of a HUP, the old pidfile still exists.
> Do you know an easy solution for this?
Not yet, there's a bug in Net::Server::Multiplex that prevents you from
using SIGHUP.
I already hit this when starting to implement on-demand static whitelist
reloading. Its not on the top of my TODO list, but I'd to have a look at
the Multiplex code to understand what's going on.
Lionel
|