I've based my daemon on this daemon class.
I run my daemon by opening a shell terminal and running the script through the command line. I see the main script exits and the child daemon goes about doing what it needs to do.
when I close the terminal the Daemon dies with it.
I tried redirecting stderr and stdout to /dev/null and that stopped the problem. Any ideas on why this doesn't happen automatically when the terminal is closed? Any ideas how to override this somehow?