From 17001a765dd1056a769d9d8fe6820ada132125f2 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 22 Aug 2006 09:23:30 +0000 Subject: 22656: improve handling of monitor option --- Src/options.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Src/options.c') 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 */ -- cgit 1.4.1