]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - sig.c
fix for SIGINT in sourced script
[thirdparty/bash.git] / sig.c
diff --git a/sig.c b/sig.c
index ad016313394aed0ef7c5b9afe3123373506222c2..e5bb73997a89bc125b3c1df637c3bc355a93ab6a 100644 (file)
--- a/sig.c
+++ b/sig.c
@@ -585,7 +585,8 @@ termsig_handler (sig)
 #if defined (JOB_CONTROL)
   if (sig == SIGHUP && (interactive || (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB))))
     hangup_all_jobs ();
-  end_job_control ();
+  if ((subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)) == 0)
+    end_job_control ();
 #endif /* JOB_CONTROL */
 
 #if defined (PROCESS_SUBSTITUTION)