Sample Header Ad - 728x90

How is PID 1 made special and unkillable?

3 votes
2 answers
432 views
Using docker, I recently found that PID 1 is by default unkillable by SIGTERM. Yet you can still catch SIGTERM in PID 1 if you setup a handler in the process. So this doesn't seem to be the case of the kernel just masking SIGTERM for PID 1. How is this implemented? How does the process as PID 1 have the default SIGTERM handler be a noop?
Asked by rrauenza (852 rep)
May 17, 2024, 10:18 PM
Last activity: Oct 14, 2024, 02:36 AM