-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
Fully Compatible
-
ALL
-
Programmability 2024-10-14, Programmability 2024-10-28, Programmability 2024-11-11
Our signal handler setup code both blocks SIGHUP and sets the signal action of SIGHUP to SIG_IGN. One would expect that blocking a signal would come before the "ignore" signal disposition, and that if a SIGHUP were sent to the mongo process, the blocking would cause the SIGHUP to become pending, and later recognized by the async signal handler's sigwait. This is what normally happens.
On macOS, the manual states that "If sa_handler is set to SIG_IGN current and pending instances of the signal are ignored and discarded." This means that SIGHUP sent to the process will be ignored and never be handled. The commit which adds this code is very old and I think we can just discard the code that sets SIG_IGN for the signals we care about.
An example is that on macOS, when sending kill -s SIGHUP $(pidof mongod), mongod processes do nothing.
This looks like it's also relevant for SIGUSR2, which is ignored and blocked.
- related to
-
SERVER-95982 Disable SIGHUP test on MacOS
- Closed