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

Re: Problems with zsh's job control and running jobs



On Sep 2,  3:47pm, Haakon Riiser wrote:
}
} Is there a way to make zsh differentiate between running and
} suspended jobs?  That is, make it so that CHECK_JOBS only looks for
} suspended jobs, not running ones?

An answer to this is related to Greg Klanderman's reply on that other
old thread (which is on zsh-workers, so those reading only zsh-users
won't have seen it).

Disowning (&!) a job differs from merely backgrounding it in one
important respect, which is that the job becomes immune to SIGHUP
and will continue running after the shell exits.

Conversely, suspended jobs are always killed when the shell exits,
regardless of the state of NO_HUP.

So it *might* make sense for CHECK_JOBS to ignore running jobs if and
only if NO_HUP.  The question is whether the intention of CHECK_JOBS
is to warn you that you've left something unfinished, or to warn you
that something is going to be summarily terminated.

-- 



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