diff options
Diffstat (limited to 'Src/options.c')
-rw-r--r-- | Src/options.c | 11 |
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 */ |