2 ms·
Behaviour depends on your shell. With Bash, for instance: > The shell exits by default upon receipt of a SIGHUP. Before exiting, an interactive shell resends t
by yrro 4y ago
Behaviour depends on your shell. With Bash, for instance:
> The shell exits by default upon receipt of a SIGHUP. Before exiting, an interactive shell resends the SIGHUP to all jobs, running or stopped. [...] To prevent the shell from sending the SIGHUP signal to a particular job, it should be removed from the jobs table with the disown builtin (see Job Control Builtins) or marked to not receive SIGHUP using disown -h.
> If the huponexit shell option has been set with shopt (see The Shopt Builtin), Bash sends a SIGHUP to all jobs when an interactive login shell exits.
https://www.gnu.org/software/bash/manual/html_node/Signals.html https://www.gnu.org/software/bash/manual/html_node/Signals.h...
- severino 4y agoThanks! I've been doing some tests with the huponexit option but it seems the tricky part was this: when an interactive login shell exits I think I remember in Linux many years ago (more than 15, maybe) the behavior was present in shells spawned from your DE, but I may be wrong.