diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-08-22 09:23:30 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-08-22 09:23:30 +0000 |
commit | 17001a765dd1056a769d9d8fe6820ada132125f2 (patch) | |
tree | b93891022c28372fb45b42a3b72108dc0070b0ba | |
parent | f20b66dd24e490fbfedac7787760b4732daa8119 (diff) | |
download | zsh-17001a765dd1056a769d9d8fe6820ada132125f2.tar.gz zsh-17001a765dd1056a769d9d8fe6820ada132125f2.tar.xz zsh-17001a765dd1056a769d9d8fe6820ada132125f2.zip |
22656: improve handling of monitor option
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/options.c | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index b1d9be91d..aa46ae286 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-08-22 Peter Stephenson <pws@csr.com> + + * 22656: Src/options.c (slightly tweaked): improve handling of + monitor option a bit. + 2006-08-21 Peter Stephenson <p.w.stephenson@ntlworld.com> * zsh-users/10634: Completion/compinstall: attempt to fix up 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 */ |