From 95732b497d12c98613bb3c5db16b61f377501a59 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Wed, 7 Dec 2005 14:08:12 +0000
Subject: Imported from ../bash-3.1.tar.gz.

---
 builtins/exec.def | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'builtins/exec.def')

diff --git a/builtins/exec.def b/builtins/exec.def
index acfdae1..0818a25 100644
--- a/builtins/exec.def
+++ b/builtins/exec.def
@@ -221,7 +221,8 @@ failed_exec:
   initialize_signals (1);
 
 #if defined (JOB_CONTROL)
-  restart_job_control ();
+  if (interactive_shell || job_control)
+    restart_job_control ();
 #endif /* JOB_CONTROL */
 
   return (exit_value);
-- 
cgit v1.2.3

