2 ms·
The article remarks its pid 1 to catch "bad" services that disown their parents and get defaulted to pid 1. But I figure if they switched the bulk of systemd t
by zanny 13y ago
The article remarks its pid 1 to catch "bad" services that disown their parents and get defaulted to pid 1.
But I figure if they switched the bulk of systemd to pid 2, any negligent services would get complained about until they were fixed.
- dalias 13y agoAlmost all daemons have a command line or config file option to skip "daemonizing" so that the parent can watch the PID correctly. For the few that don't, you can fix them, hack them (e.g. LD_PRELOAD wrappers to shutdown their bogus double-forking), seccomp-ptrace them, or simply wrap them with a legacy-style monitor that reads the pid file and forwards signals it receives to the real pid (this last option of course doesn't fix the race conditions inherent in such usage).
- rcxdude 13y agoThis is something systemd can already handle. Linux has APIs to change the 'reaper' process (PR_SET_CHILD_SUBREAPER) so that orphaned processes move to a non PID 1 process.