diff options
-rw-r--r-- | Doc/Zsh/options.yo | 8 | ||||
-rw-r--r-- | Src/builtin.c | 3 | ||||
-rw-r--r-- | Src/options.c | 1 | ||||
-rw-r--r-- | Src/zsh.h | 1 |
4 files changed, 12 insertions, 1 deletions
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index 8d10bdbb3..795d37a22 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -239,6 +239,14 @@ This also has the effect of tt(CHASE_DOTS), i.e. a `tt(..)' path segment will be treated as referring to the physical parent, even if the preceeding path segment is a symbolic link. ) +pindex(CHECK_JOBS) +cindex(exiting, checking jobs when) +cindex(logging out, checking jobs when) +item(tt(CHECK_JOBS) <Z>)( +Report the status of background and suspended jobs before exiting a shell +with job control. tt(NO_CHECK_JOBS) is best used only in combination with +tt(NO_HUP), else such jobs will be killed automatically. +) pindex(CLOBBER) cindex(clobbering, of files) cindex(file clobbering, allowing) diff --git a/Src/builtin.c b/Src/builtin.c index a7c03acef..acefcd111 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3153,7 +3153,8 @@ zexit(int val, int from_signal) HEAPALLOC { if (isset(MONITOR) && !stopmsg && !from_signal) { scanjobs(); /* check if jobs need printing */ - checkjobs(); /* check if any jobs are running/stopped */ + if (isset(CHECKJOBS)) + checkjobs(); /* check if any jobs are running/stopped */ if (stopmsg) { stopmsg = 2; LASTALLOC_RETURN; diff --git a/Src/options.c b/Src/options.c index 878ab2247..2fd2ae373 100644 --- a/Src/options.c +++ b/Src/options.c @@ -93,6 +93,7 @@ static struct optname optns[] = { {NULL, "cdablevars", OPT_EMULATE, CDABLEVARS}, {NULL, "chasedots", OPT_EMULATE, CHASEDOTS}, {NULL, "chaselinks", OPT_EMULATE, CHASELINKS}, +{NULL, "checkjobs", OPT_EMULATE|OPT_ZSH, CHECKJOBS}, {NULL, "clobber", OPT_EMULATE|OPT_ALL, CLOBBER}, {NULL, "completealiases", 0, COMPLETEALIASES}, {NULL, "completeinword", 0, COMPLETEINWORD}, diff --git a/Src/zsh.h b/Src/zsh.h index 9a5699160..c34b2bd53 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -1267,6 +1267,7 @@ enum { CDABLEVARS, CHASEDOTS, CHASELINKS, + CHECKJOBS, CLOBBER, COMPLETEALIASES, COMPLETEINWORD, |