Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to configure zsh so that its job control behaves more like (I think) bash does by default. In particular:

  1. When I start a background job, it is by default owned by the shell and can be controlled via its job control.
  2. When I try to quit once, I get a warning.
  3. When I quit again, it is automatically disowned (i.e. not terminated) and zsh ends.

I've been testing this by executing sleep 1000 & to create a background job. Putting setopt CHECK_JOBS in my ~/.zshrc appears to address point (2) above. However, I cannot get (3) to work; zsh always kills the process when the shell quits. How can I stop this?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Unset the HUP option using one of the following

setopt NO_HUP
unsetopt HUP
share|improve this answer
    
Works perfectly, thanks! –  Andrew Ferrier Feb 15 '13 at 23:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.