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

Re: have '&' automatically disown?

On Feb 7,  9:34pm, Peter Stephenson wrote:
} Subject: Re: have '&' automatically disown?
} Greg Klanderman wrote:
} > Would it make sense to just auto-disown when monitor is off?
} That *does* make a lot of sense, actually: if job control's turned off,
} there's no point in half-pretending it isn't.  Disowning existing
} background jobs at that point at least makes more sense than having them
} come back in a zombified fashion.  I'll think about it tomorrow.

Disowning a job makes it immune to HUP signals, etc.  That's not what
nomonitor is for -- turning off monitor is supposed to make zsh act
like the old Bourne shell, where jobs still "belonged" to the shell
and would be HUP'd if the terminal connection dropped, but the shell
had no way move them between background and foreground.

The reason you seem to hang the shell when foregrounding a job that
was started with monitor turned off, is because jobs started without
monitoring must be immune to keyboard signals other than hangup.  The
shell is not really hung, but once the process has been forked the
shell has no way to tell it to change its SIGINT/SIGTSTP behavior to
go back to being interruptible/stoppable.

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