Exit zsh, but leave running jobs open?

前端 未结 4 1020
温柔的废话
温柔的废话 2021-01-30 01:25

Just switched from bash to zsh.

In bash, background tasks continue running when the shell exits. For example here, dolphin continues running after the

4条回答
  •  温柔的废话
    2021-01-30 01:53

    From the zsh documentation:

    HUP

    ... In zsh, if you have a background job running when the shell exits, the shell will assume you want that to be killed; in this case it is sent a particular signal called SIGHUP... If you often start jobs that should go on even when the shell has exited, then you can set the option NO_HUP, and background jobs will be left alone.

    So just set the NO_HUP option:

    % setopt NO_HUP
    

提交回复
热议问题