Chet Ramey wrote:
Matthew Woehlke wrote:
$ some-command &
$ ^D
(bash exits, leaving some-command running)
Is this what is supposed to happen? Just asking because it made me go
"huh?"; I was expecting some-command to get SIGHUP'd.
Yes, that's what's supposed to happen. How could you run daemons from
the command line otherwise?
"disown"?
What feels weird to me is that if the shell exits because of SIGHUP,
that gets passed to children, but EOF doesn't do likewise.
This came up because closing terminal emulators will SIGHUP bash
depending on how the TE exited, especially if it crashed, which then
takes out non-disowned child processes (and there is similar cascade
effect when e.g. an ssh session was running). EOF seems to be the "odd
man out" in that children get to stick around without the user
explicitly saying they should.
However, come to think of it the EOF behavior probably makes more sense
for non-interactive shells... which throws the question back to the TE.
I'm curious if you have an opinion; should a TE send EOF or SIGHUP when
exiting normally but forcefully (i.e. user clicks the WM 'close window'
button or uses File->Exit)?
--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
ヱルキ・マーチウ