Home nohup: Because Your Job Shouldn't Die Just Because You Logged Out

    nohup: Because Your Job Shouldn’t Die Just Because You Logged Out

    0
    9
    blank

    nohup — “no hangup” — exists because of SIGHUP, the signal Unix sends to a process’s children when a terminal disconnects, inherited from the days when “logging out” might mean a physical phone line dropping. Without nohup, starting a long job over SSH and closing the terminal would kill it. With nohup, the process politely ignores the hangup signal and continues running, logging output to nohup.out by default. It is simple, blunt, and slightly embarrassing that it’s still necessary. screen and tmux solve the same problem more elegantly, with persistent sessions and reattachable terminals, but nohup persists because it’s always there, requires no setup, and can be prepended to any command in under a second by someone who just realised they forgot to start something in a screen session and is already halfway through a four-hour database migration.