Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: "sh" job control
- X-seq: zsh-workers 8109
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: "sh" job control
- Date: Thu, 30 Sep 1999 10:24:17 -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Most other shells seem to default to exiting right away when told to
exit while there are jobs in the job table. zsh provided no way for
silence (other than disowning all jobs or setopt nomonitor)
The following patch introduces an option "shjobcontrol" (bad name?)
which skips the checkjobs() call.
diff -c --recursive Src.old/builtin.c Src/builtin.c
*** Src.old/builtin.c Tue Sep 21 05:25:31 1999
--- Src/builtin.c Thu Sep 30 10:03:53 1999
***************
*** 3152,3158 ****
HEAPALLOC {
if (isset(MONITOR) && !stopmsg && !from_signal) {
scanjobs(); /* check if jobs need printing */
! checkjobs(); /* check if any jobs are running/stopped */
if (stopmsg) {
stopmsg = 2;
LASTALLOC_RETURN;
--- 3152,3159 ----
HEAPALLOC {
if (isset(MONITOR) && !stopmsg && !from_signal) {
scanjobs(); /* check if jobs need printing */
! if (unset(SHJOBCONTROL))
! checkjobs(); /* check if any jobs are running/stopped */
if (stopmsg) {
stopmsg = 2;
LASTALLOC_RETURN;
diff -c --recursive Src.old/options.c Src/options.c
*** Src.old/options.c Wed Sep 22 08:59:48 1999
--- Src/options.c Thu Sep 30 10:14:49 1999
***************
*** 186,191 ****
--- 186,192 ----
{NULL, "shinstdin", OPT_SPECIAL, SHINSTDIN},
{NULL, "shoptionletters", OPT_EMULATE|OPT_BOURNE, SHOPTIONLETTERS},
{NULL, "shortloops", OPT_ALL, SHORTLOOPS},
+ {NULL, "shjobcontrol", OPT_EMULATE|OPT_NONZSH, SHJOBCONTROL},
{NULL, "shwordsplit", OPT_EMULATE|OPT_BOURNE, SHWORDSPLIT},
{NULL, "singlecommand", OPT_SPECIAL, SINGLECOMMAND},
{NULL, "singlelinezle", OPT_KSH, SINGLELINEZLE},
diff -c --recursive Src.old/zsh.h Src/zsh.h
*** Src.old/zsh.h Wed Sep 22 08:59:48 1999
--- Src/zsh.h Thu Sep 30 10:07:34 1999
***************
*** 1359,1364 ****
--- 1359,1365 ----
SHINSTDIN,
SHOPTIONLETTERS,
SHORTLOOPS,
+ SHJOBCONTROL,
SHWORDSPLIT,
SINGLECOMMAND,
SINGLELINEZLE,
Messages sorted by:
Reverse Date,
Date,
Thread,
Author