Created an attachment (id=1766)
ignore SIGHUP across sshd re-exec window
In Ubuntu bug #497781, "PierreF" reported that it's sometimes possible to end up with no sshd running if you send it two SIGHUP signals in quick succession, which can sometimes happen due to configuration of networking scripts. Although I haven't been able to reproduce this myself so far, I think this is because SIGHUP is reset to the default action by execve(), and sshd's handler isn't reinstalled until shortly after the exec, so there's a window when it's simply set to the default action of terminating the process.
If this hypothesis is correct, which I think is likely, then the attached patch should fix it by ignoring SIGHUP across the exec window.
Created an attachment (id=1766)
ignore SIGHUP across sshd re-exec window
In Ubuntu bug #497781, "PierreF" reported that it's sometimes possible to end up with no sshd running if you send it two SIGHUP signals in quick succession, which can sometimes happen due to configuration of networking scripts. Although I haven't been able to reproduce this myself so far, I think this is because SIGHUP is reset to the default action by execve(), and sshd's handler isn't reinstalled until shortly after the exec, so there's a window when it's simply set to the default action of terminating the process.
If this hypothesis is correct, which I think is likely, then the attached patch should fix it by ignoring SIGHUP across the exec window.