On 2022-11-05 22:51, Eli Zaretskii wrote:

But is it possible for a program like Emacs to get SIGHUP in such a
situation, or is that highly improbable?  We have standard streams of
the inferior Emacs process connected via PTYs to the parent process, I
believe -- does that deliver SIGHUP or SIGPIPE when the parent exits?

It depends on the OS and the app that invokes Emacs and how that app itself was invoked. It's a hairy area.

On a POSIX platform it's certainly *possible* for Emacs to get SIGHUP in that situation, because a user can invoke the shell command 'kill -s HUP P', where P is the process ID of the inferior Emacs. Whether it's *likely* is a bit harder to say. I ran a few little experiments on Fedora 36 and Ubuntu 22.10 and found SIGHUP being sent in a few situations and not others and didn't have the time or patience to suss out exactly why or when.

Reply via email to