summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/options.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Src/options.c b/Src/options.c
index 05e878687..d30553050 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -687,7 +687,16 @@ dosetopt(int optno, int value, int force)
 	setuid(getuid());
 	setgid(getgid());
 #endif /* HAVE_SETUID */
-#ifndef JOB_CONTROL
+#ifdef JOB_CONTROL
+    } else if (!force && optno == MONITOR && value) {
+	if (opts[optno] == value)
+	    return 0;
+	if (interact && (SHTTY != -1)) {
+	    origpgrp = GETPGRP();
+	    acquire_pgrp();
+	} else
+	    return -1;
+#else
     } else if(optno == MONITOR && value) {
 	    return -1;
 #endif /* not JOB_CONTROL */