Short answer: because you’re a freaking idiot.
Long answer: My shell script is on a Linux server. I access via ssh using Putty. I run it from the command line, from Window #1, Â like this:
$ bin/myapp.sh &
when I close my ssh window. In Window #2, I watch the logs, and I can see that myapp.sh has exited. Specifically, it caught a SIGHUP.
How to fix this? Don’t close the window. Instead, exit from the ssh session by typing “exit”.
Short answer: I’m a freaking idiot.