[systemd-devel] lighttp unit - graceful reload of configfiles by sending signal to $MAINPID

Lennart Poettering lennart at poettering.net
Tue Jan 18 03:51:09 PST 2011


On Tue, 18.01.11 16:41, Alexander E. Patrakov (patrakov at gmail.com) wrote:

> >How is this implemented in detail? Sending SIGINT is async, so at the
> >time you start the new instance you cannot be sure that the old instance
> >has stopped listening?
> 
> Indeed, there is a race here. That's why "/bin/sleep 1" in my
> initial service file.

Hmm, what's the lighthttp people's take on this? They came up with the
scheme, so how do they think this problem should be handled?

(One possible solution could be if the old and the new instance would
communicate and pass the listening sockets via some AF_UNIX
socket/SCM_RIGHTS or so. But that is not trivial.)

"Solutions" such as sleep 1 are not really how we do things in systemd
land...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list