Skip to content

smbd: call exit_server_cleanly() to avoid panicking

https://bugzilla.samba.org/show_bug.cgi?id=15275

The parent smdb forwards SIGTERM to its process group in order to kill all children like the scavenger. This happens from a function registered via atexit() which means the signal forwarding is happening very briefly before the main smbd process exits. When exiting the pipe between smbd and scavenger is closed which triggers a file event in the scavenger.

However, due to kernel sheduling it is possible that the file descriptor event is received before the signal, where we call exit_server() which call smb_panic() at the end.

Change the exit to exit_server_cleanly() and just log this event at level 2 which we already do.

Merge request reports