Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

"You have running jobs" warning



When I set NO_HUP, I would like the "you have running jobs" warning to
disappear when leaving zsh, since the option should make it look like
other shells in that respect (e.g. bash prints no warnings about
background running jobs).

Thus, if nohup is unset, the warning should be printed and the shell
should require pressing C-d twice to exit, HUP-ing the job before
exiting.

However, if nohup is set, there should be no warning about running
background jobs, and only one C-d should be sufficient to exit. This
little patch does this. Could you please include it to the
distribution, since the modified behaviour strikes me as much more
logical.

*** jobs.c.orig	Sat Jun  1 18:31:07 1996
--- jobs.c	Sat Jun  1 19:42:54 1996
***************
*** 846,855 ****
  #else
  	    zerr("you have stopped jobs.", NULL, 0);
  #endif
  
! 	} else
  	    zerr("you have running jobs.", NULL, 0);
! 	stopmsg = 1;
      }
  }
  
--- 846,857 ----
  #else
  	    zerr("you have stopped jobs.", NULL, 0);
  #endif
+ 	    stopmsg = 1;
  
! 	} else if (!isset(NOHUP)) {
  	    zerr("you have running jobs.", NULL, 0);
! 	    stopmsg = 1;
! 	}
      }
  }
  


-- 
hniksic@xxxxxxx              |  Student of electrical engineering
hniksic@xxxxxxxxxxxxx        |  University of Zagreb, Croatia
------------------------------------------------------------------
Signature strajka!




Messages sorted by: Reverse Date, Date, Thread, Author