zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: "sh" job control
Date: Thu, 30 Sep 1999 10:24:17 -0400	[thread overview]
Message-ID: <19990930102417.A12538@dman.com> (raw)

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,


             reply	other threads:[~1999-09-30 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-30 14:24 Clint Adams [this message]
1999-09-30 14:08 ` Peter Stephenson
1999-09-30 14:53   ` Zefram
1999-09-30 14:44     ` Peter Stephenson
1999-09-30 15:27       ` Clint Adams
1999-09-30 14:57         ` Peter Stephenson
1999-09-30 15:07     ` Clint Adams
1999-10-01  1:41       ` POSIX (Was: PATCH: "sh" job control) Geoff Wing
1999-10-01  6:23         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990930102417.A12538@dman.com \
    --to=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).