Exercise 1: nohup vs. a Plain Background Job — Possible Solution ================================================================= $ nohup sleep 600 & [1] 71002 nohup: ignoring input and appending output to 'nohup.out' $ sleep 700 & [2] 71010 Close the terminal window. Log in again: $ pgrep -a sleep 71002 sleep 600 Usually only the nohup job survives. Why: closing the window makes the terminal hang up. The kernel sends SIGHUP to the shell, and bash passes SIGHUP on to both jobs. The plain `sleep 700` reacts the default way and exits. The nohup job was started with SIGHUP ignored, so the signal has no effect and it keeps running. (Results can vary. If systemd's KillUserProcesses is enabled, even the nohup job is killed at logout — see Exercise 3.) WHY THIS WORKS AS AN ANSWER ------------------------------ It traces the signal through the chain described in the chapter and explains the result, while noting the one setting that can change it.