reader.cpp: during forced exit, send SIGHUP to foreground processes only

Closes #1771.
This commit is contained in:
David Adam 2015-03-12 14:09:29 +08:00
parent b9bd0166b6
commit bff68f3bfc

View file

@ -2900,7 +2900,11 @@ static void handle_end_loop()
job_iterator_t jobs;
while ((j = jobs.next()))
{
if (! job_is_completed(j))
/* Send SIGHUP only to foreground processes.
See https://github.com/fish-shell/fish-shell/issues/1771
*/
if (! job_is_completed(j) && job_get_flag(j, JOB_FOREGROUND))
{
job_signal(j, SIGHUP);
}