zsh-users
 help / color / mirror / code / Atom feed
* Exiting zsh with jobs in background
@ 1997-03-24 16:48 Steve Talley
  1997-03-25 23:21 ` Hrvoje Niksic
  1997-03-26 17:42 ` Zefram
  0 siblings, 2 replies; 9+ messages in thread
From: Steve Talley @ 1997-03-24 16:48 UTC (permalink / raw)
  To: zsh-users; +Cc: stephen.talley

Is there any way to turn off the "zsh: you have running jobs." message
that appears when you try to exit zsh with jobs in the background?  I
have the "nohup" option set so that zsh won't kill those jobs, but I'd
like to be able to exit the shell without being nagged about running
jobs.

Also...

When zsh has multiple completion possibilities, it gives the the
error:

zsh: do you wish to see all <n> possibilities?

What is the minimum value of n such that this message will appear?  Can
I change this value or disable the message entirely?

Steve

~~
stephen.talley@Central.Sun.COM


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

* Re: Exiting zsh with jobs in background
  1997-03-24 16:48 Exiting zsh with jobs in background Steve Talley
@ 1997-03-25 23:21 ` Hrvoje Niksic
  1997-03-26  3:36   ` Andrew J Cosgriff
  1997-03-26 17:42 ` Zefram
  1 sibling, 1 reply; 9+ messages in thread
From: Hrvoje Niksic @ 1997-03-25 23:21 UTC (permalink / raw)
  To: Steve Talley; +Cc: zsh-users

stephen.talley@Central.Sun.COM (Steve Talley) writes:

> Is there any way to turn off the "zsh: you have running jobs." message
> that appears when you try to exit zsh with jobs in the background?  I
> have the "nohup" option set so that zsh won't kill those jobs, but I'd
> like to be able to exit the shell without being nagged about running
> jobs.

There is no way to turn it off.  I once posted a patch that made zsh
behave like bash in that respect (i.e. not to warn about running job
when nohup is set), but it was rejected.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Ask not for whom the <CONTROL-G> tolls.


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

* Re: Exiting zsh with jobs in background
  1997-03-25 23:21 ` Hrvoje Niksic
@ 1997-03-26  3:36   ` Andrew J Cosgriff
  1997-03-26  3:44     ` Hrvoje Niksic
  1997-03-26 10:20     ` Juergen Christoffel
  0 siblings, 2 replies; 9+ messages in thread
From: Andrew J Cosgriff @ 1997-03-26  3:36 UTC (permalink / raw)
  To: zsh-users

"Hrv" == Hrvoje Niksic <hniksic@srce.hr> writes:

st> Is there any way to turn off the "zsh: you have running jobs."
st> message that appears when you try to exit zsh with jobs in the
st> background?  I have the "nohup" option set so that zsh won't kill
st> those jobs, but I'd like to be able to exit the shell without
st> being nagged about running jobs.

Hrv> There is no way to turn it off.  I once posted a patch that made
Hrv> zsh behave like bash in that respect (i.e. not to warn about
Hrv> running job when nohup is set), but it was rejected.

On the small number of occasions I actually i) log out, and ii) have
jobs running, and hence get the warning, I just disown them.

If I was really keen, maybe I'd have done something in .zlogout to
disown all my running jobs.

*shrug*

Andrew.
-- 
 - Andrew J. Cosgriff -                  ajc@bing.wattle.id.au    (PGP/MIME ok)
 +61 3 9905 1165 (bh) 9905 4746 (fax)    http://www-personal.monash.edu.au/~ajc
         Spreading peanut butter reminds me of opera!!  I wonder why?


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

* Re: Exiting zsh with jobs in background
  1997-03-26  3:36   ` Andrew J Cosgriff
@ 1997-03-26  3:44     ` Hrvoje Niksic
  1997-03-26  4:01       ` Aaron Schrab
  1997-03-26 10:20     ` Juergen Christoffel
  1 sibling, 1 reply; 9+ messages in thread
From: Hrvoje Niksic @ 1997-03-26  3:44 UTC (permalink / raw)
  To: Andrew J Cosgriff; +Cc: zsh-users

Andrew J Cosgriff <Andrew.Cosgriff@cc.monash.edu.au> writes:

> On the small number of occasions I actually i) log out, and ii) have
> jobs running, and hence get the warning, I just disown them.

But the warning doesn't happen only in login shells.  Each time I
press C-d in my xterm or screen terminal, I get the warning.  Note
that the warning really is unnecessary because the nohup is set, so
zsh will do nothing about the jobs.

> If I was really keen, maybe I'd have done something in .zlogout to
> disown all my running jobs.

Yes, you can do that, but the goal of the patch was to enhance the
default behaviour for a casual user.  I know one can get all of it
through .zlogout.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
I'm sure they'll listen to reason! -- Neal Stevenson, _Snow Crash_


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

* Re: Exiting zsh with jobs in background
  1997-03-26  3:44     ` Hrvoje Niksic
@ 1997-03-26  4:01       ` Aaron Schrab
  1997-03-26  4:07         ` Hrvoje Niksic
  0 siblings, 1 reply; 9+ messages in thread
From: Aaron Schrab @ 1997-03-26  4:01 UTC (permalink / raw)
  To: zsh-users

At 04:44 AM, Wednesday, 26 Mar 1997, Hrvoje Niksic <hniksic@srce.hr> wrote:
> 
> But the warning doesn't happen only in login shells.  Each time I
> press C-d in my xterm or screen terminal, I get the warning.  Note
> that the warning really is unnecessary because the nohup is set, so
> zsh will do nothing about the jobs.

Just because zsh won't kill the jobs doesn't mean that the warning is
useless, if I suspend my mailer, editor, etc. and then forget about it,
I want to be reminded before I exit the shell.

-- 
Aaron Schrab         aarons@execpc.com         http://www.execpc.com/~aarons/
 To err is human -- to blame it on a computer is even more so.


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

* Re: Exiting zsh with jobs in background
  1997-03-26  4:01       ` Aaron Schrab
@ 1997-03-26  4:07         ` Hrvoje Niksic
  0 siblings, 0 replies; 9+ messages in thread
From: Hrvoje Niksic @ 1997-03-26  4:07 UTC (permalink / raw)
  To: Aaron Schrab; +Cc: zsh-users

Aaron Schrab <aarons@execpc.com> writes:

> Just because zsh won't kill the jobs doesn't mean that the warning is
> useless, if I suspend my mailer, editor, etc. and then forget about it,
> I want to be reminded before I exit the shell.

But the warning will remain for suspended processes.


P.S.
This strangely reminds me a similar discussion back then. :-)

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Then...  his face does a complete change of expression.  It goes from
a "Vengeance is mine" expression, to a "What the fuck" blank look.


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

* Re: Exiting zsh with jobs in background
  1997-03-26  3:36   ` Andrew J Cosgriff
  1997-03-26  3:44     ` Hrvoje Niksic
@ 1997-03-26 10:20     ` Juergen Christoffel
  1 sibling, 0 replies; 9+ messages in thread
From: Juergen Christoffel @ 1997-03-26 10:20 UTC (permalink / raw)
  To: Andrew.Cosgriff; +Cc: zsh-users

   Date: Wed, 26 Mar 1997 14:36:04 +1100
   From: Andrew J Cosgriff <Andrew.Cosgriff@cc.monash.edu.au>

   On the small number of occasions I actually i) log out, and ii) have
   jobs running, and hence get the warning, I just disown them.

You don't need to disown them when they are started with nohup, you
just have to hit ^D once more to logout. But that sometimes *is*
annoying. 

   If I was really keen, maybe I'd have done something in .zlogout to
   disown all my running jobs.

How would one do that elegantly? While zsh writes the output of "jobs"
to a file (which I wouldn't name the most elegant solution), it starts
a subshell which won't see the jobs of its parent if you either pipe
it into e.g. xargs or try to put it into a variable, e.g.
JOBS=(`jobs`)

Just curious.

	--jc


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

* Re: Exiting zsh with jobs in background
  1997-03-24 16:48 Exiting zsh with jobs in background Steve Talley
  1997-03-25 23:21 ` Hrvoje Niksic
@ 1997-03-26 17:42 ` Zefram
  1 sibling, 0 replies; 9+ messages in thread
From: Zefram @ 1997-03-26 17:42 UTC (permalink / raw)
  To: Steve Talley; +Cc: zsh-users

Steve Talley wrote:
>When zsh has multiple completion possibilities, it gives the the
>error:
>
>zsh: do you wish to see all <n> possibilities?

It's not an error message.

>What is the minimum value of n such that this message will appear?

Whatever would cause the list not to fit on the screen.

>                                                                    Can
>I change this value or disable the message entirely?

You can change $LISTMAX to some fixed number.  To disable the message,
set it to something large.

-zefram


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

* Re: Exiting zsh with jobs in background
@ 1997-03-26  6:10 Steve Talley
  0 siblings, 0 replies; 9+ messages in thread
From: Steve Talley @ 1997-03-26  6:10 UTC (permalink / raw)
  To: zsh-users; +Cc: stephen.talley

> st> Is there any way to turn off the "zsh: you have running jobs."
> st> message that appears when you try to exit zsh with jobs in the
> st> background?  I have the "nohup" option set so that zsh won't kill
> st> those jobs, but I'd like to be able to exit the shell without
> st> being nagged about running jobs.
> 
> Hrv> There is no way to turn it off.  I once posted a patch that made
> Hrv> zsh behave like bash in that respect (i.e. not to warn about
> Hrv> running job when nohup is set), but it was rejected.
> 
> On the small number of occasions I actually i) log out, and ii) have
> jobs running, and hence get the warning, I just disown them.

I don't need to disown them at this point -- since I have nohup set I just hit
Ctrl-D again and the shell exits.  The problem is that I want to avoid the
message if I can.  Having nohup set should allow me to do this...

> 
> If I was really keen, maybe I'd have done something in .zlogout to
> disown all my running jobs.
> 

By the time .zlogout gets sourced it is too late to disown the jobs.  You could
put a function in precmd that disowns jobs immediately, but then you lose job
control.  Clearly a "nowarn" option is needed for zsh.

Steve

~~
stephen.talley@Central.Sun.COM


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

end of thread, other threads:[~1997-03-26 17:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-24 16:48 Exiting zsh with jobs in background Steve Talley
1997-03-25 23:21 ` Hrvoje Niksic
1997-03-26  3:36   ` Andrew J Cosgriff
1997-03-26  3:44     ` Hrvoje Niksic
1997-03-26  4:01       ` Aaron Schrab
1997-03-26  4:07         ` Hrvoje Niksic
1997-03-26 10:20     ` Juergen Christoffel
1997-03-26 17:42 ` Zefram
1997-03-26  6:10 Steve Talley

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