zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: "sh" job control
@ 1999-09-30 14:24 Clint Adams
  1999-09-30 14:08 ` Peter Stephenson
  0 siblings, 1 reply; 9+ messages in thread
From: Clint Adams @ 1999-09-30 14:24 UTC (permalink / raw)
  To: zsh-workers

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,


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1999-10-01  6:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-30 14:24 PATCH: "sh" job control Clint Adams
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

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).