In zsh, setopt nohup seems to be required to make nohup work, as follows:
# nohup does not work without setopt nohup ➜ /tmp zsh ➜ /tmp nohup watch ls & [1] 31556 nohup: ignoring input and appending output to ‘nohup.out’ ➜ /tmp exit zsh: you have running jobs. ➜ /tmp exit zsh: warning: 1 jobs SIGHUPed ➜ /tmp ps -fp 31556 UID PID PPID C STIME TTY TIME CMD # It works well with setopt nohup ➜ /tmp zsh ➜ /tmp setopt nohup ➜ /tmp nohup watch ls & [1] 31216 nohup: ignoring input and appending output to ‘nohup.out’ ➜ /tmp exit zsh: you have running jobs. ➜ /tmp exit ➜ /tmp ps -fp 31216 UID PID PPID C STIME TTY TIME CMD nori 31216 1 0 19:00 pts/6 00:00:00 watch ls Why does zsh need setopt nohup since bash does not?
zshwithout thenohupoption (only using thenohupexecutable). Outputnohupoption the shell sendsSIGHUPbut thenohupcommand did its job so the signal is ignored. You should post that as an answer.watchprocess seems to be killed. I'll update my question.