From b31ca21b46ae445ca12ab0c89ad0d66e5426328b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 8 Jul 2009 17:06:02 +0000 Subject: 27100: Allow MONITOR option in non-interactive shells for testing. --- ChangeLog | 8 +++++++- Src/init.c | 2 +- Src/options.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb30a1b91..3a4ca1fc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-08 Peter Stephenson + + * 27100: Allow MONITOR option in non-interactive shells. + Not properly test it, but you only get if you ask for it, + so worth committing to allow it to be further investigated. + 2009-07-06 Peter Stephenson * 27092: Src/parse.c, Test/A01grammar.ztst: "if" didn't check @@ -11910,5 +11916,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.4728 $ +* $Revision: 1.4729 $ ***************************************************** diff --git a/Src/init.c b/Src/init.c index 41e5ecf9f..189451966 100644 --- a/Src/init.c +++ b/Src/init.c @@ -486,7 +486,7 @@ init_io(void) * process group leader. */ mypid = (zlong)getpid(); - if (opts[MONITOR] && interact && (SHTTY != -1)) { + if (opts[MONITOR] && (SHTTY != -1)) { origpgrp = GETPGRP(); acquire_pgrp(); /* might also clear opts[MONITOR] */ } else diff --git a/Src/options.c b/Src/options.c index d310f346d..b2b306cd9 100644 --- a/Src/options.c +++ b/Src/options.c @@ -730,7 +730,7 @@ dosetopt(int optno, int value, int force) } else if (!force && optno == MONITOR && value) { if (opts[optno] == value) return 0; - if (interact && (SHTTY != -1)) { + if (SHTTY != -1) { origpgrp = GETPGRP(); acquire_pgrp(); } else -- cgit 1.4.1