[haiku-development] Bash and Jobs

Howdy,

I've implemented/finished some features required for job control and 
enabled it in the shell (feel free to play with it and report problems). As 
a consequence the behavior when exiting/terminating the shell changed.

When the terminal is closed, it sends a SIGHUP (hang up) signal to the 
shell, which in turn sends a SIGHUP to all of its jobs that haven't 
previously been disowned or set to ignore SIGHUP (cf. the "disown" shell 
built-in). Unless explicitly caught, SIGHUP terminates a process. So 
usually everything that has been started directly from the shell will die a 
quick and painless death when the terminal is closed.

Interestingly, when the shell is "exit"ed, jobs will only be sent a SIGHUP, 
if that had explicitly been specified before (via "shopt -s huponexit"). 
That is normally all jobs will continue to enjoy their good health even 
after the terminal has gone.

Personally I find this more than a bit inconsistent and wonder, if we want 
to change that behavior. Any opinions?

CU, Ingo

Other related posts: