You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch makes two small changes to the documentation:
First, "zombie" processes are in a terminated state and will appear in
"ps" output in "Z" state. The problem described in our documentation
seems to actually be about the "orphan" condition, in which a process
continues running after its parent terminates. Most unix systems will
reparent the process with PID 1 but this can vary, but there is no
convention that the process should stop unless it has been wired using
eg. "prctl" to detect a terminated parent. The distinction between
zombie and orphan is important because it means the child is still
active.
Second, our suggestion that the child process should detect stdin
closure is a good workaround but is not generally true for
applications that aren't doing their work on stdio. I've tried to
clean up the text around the example shell script to clarify that
developers are free to use this technique to detect parent
termination, but it's not the rule for polite unix applications.
Hijacking stdin also comes with some drawbacks as is already
mentioned.
I'm not suggesting a different workaround at the moment—there is a
linux-specific technique of using "prctl" which is demonstrated in
https://groups.google.com/g/elixir-lang-core/c/yiepKrcEniU ,
however this isn't portable.
See #7495 and #9171
0 commit comments