Blocking SIGTERM in nmbd, why?
jra at samba.org
Tue Jan 27 16:23:35 GMT 2009
On Tue, Jan 27, 2009 at 09:47:59AM +0100, Stefan (metze) Metzmacher wrote:
> Jeremy Allison schrieb:
> > Parts of nmbd are still not signal-safe. Look
> > at the sendto() call in send_udp() in libsmb/nmblib.c.
> > To make this signal-safe we'd need to change it to
> > sys_sendto().
> > This is probably ok for dealing with SIGTERM as
> > we want to quit in the case anyway. But there
> > remain places where we restart the system call
> > when interrupted with EINTR and places we don't.
> > We should be consistent in this (the sendto
> > call above was just one of the places I noticed,
> > I haven't had time today to scan for more).
> As we don't block SIGUSR1 (used for messaging) and SIGHUP,
> blocking SIGTERM makes no sense then. The sento() bug is there
> anyway. I'll just push my changes.
Yes, I think this was done when the term code was
in the signal handler itself. Subsequent changes
have made it obsolete :-).
More information about the samba-technical