Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "You have running jobs" warning
- X-seq: zsh-workers 1254
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: hniksic@xxxxxxxxxxxxxx
- Subject: Re: "You have running jobs" warning
- Date: Mon, 3 Jun 1996 18:01:22 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx (Zsh workers list)
- In-reply-to: <199606031345.PAA03340@xxxxxxxxxxxxx> from Hrvoje Niksic at "Jun 3, 96 03:45:28 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> In your mail, you said:
> > >I am not sure I follow you.
> > > MONITOR (-m)
> > > Allow job control. Set by default in interactive
> > > shells.
> > >
> > >What does this have to do with what I have written?
> >
> > If you disable job control, you will not get the warning when
> > terminating the shell.
>
> Well, yes of course. If I kill -9 $$, I will also get no warning, but it is
> definitely not what I had in mind.
You can alias exit to 'unsetopt monitor ; exit' or you can write an exit
function which checks if there are suspended jobs and exits unconditionally
if no suspended jobs found and gives a warning otherwise. This way you can
write an exit which does exactly what you want. The main point that this
can be done uning the existing shell tools so we should not complicate the
code with this. Also many people (including myself) perfer the present
behaviour. I always use setopt nohup but I'd still like to get warnings.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author