CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2021/06/03 23:09:08
Modified files:
usr.bin/ssh : sshd.c
Log message:
Switch the listening select loop from select() to pselect() and
mask signals while checking signal flags, umasking for pselect and
restoring afterwards. Also restore signals before sighup_restart
so they don't remain blocked after restart.
This prevents a race where a SIGTERM or SIGHUP can arrive between
checking the flag and calling select (eg if sshd is processing a
new connection) resulting in sshd not shutting down until the next
time it receives a new connection. bz#2158, with & ok djm@