From bff68f3bfc25feb50be3d870c6a535a7561ecc10 Mon Sep 17 00:00:00 2001 From: David Adam Date: Thu, 12 Mar 2015 14:09:29 +0800 Subject: [PATCH] reader.cpp: during forced exit, send SIGHUP to foreground processes only Closes #1771. --- reader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reader.cpp b/reader.cpp index f9299a3c9..b946bbcb7 100644 --- a/reader.cpp +++ b/reader.cpp @@ -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); }