Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix detection of parent process death (#7914)
This code assumes os.getppid() == 1 is a reliable signal of parent death, because traditionally, pid=1 adopts orphaned processes. However, systemd --user instances on linux are processes with pid > 1 that also seem to adopt orphan processes. In such cases, we would miss parent death, and leak orphaned tail processes. This changes the detection criteria to "parent pid has changed".
- Loading branch information