Hello Dmitry,

On Wed, Dec 12, 2012 at 09:16:08AM +0400, Dmitry Sivachenko wrote:
> Hello!
> 
> Why haproxy does not unlink local sockets (stats socket, other local sockets 
> if there are frontends bound to
> local unix socket) upon exit?
> 
> Is there any special reason not to do it?

Simply because the process is supposed to be run chrooted so it should
not have file system access anymore after the fork(). Thus it cannot
remove these file system entries.

Also, when performing a soft restart, the new process renames those
entries in order to bind to the new sockets, so the old process does
not know what name the old socket gets.

However, I agree that during debugging sessions, it might make sense to
get rid of these entries. Maybe we should just attempt to remove them
upon exit (when the process has not been replaced). I don't really know.
I must confess that this has never bothered me.

Willy


Reply via email to