Quick and Dirty Daemon
What's a quick and dirty way to launch a daemon process so that it keeps running even if the user that launched it logs off? I don't need anything fancy, like the standard start/stop/restart init scripts for the standard daemons.
|
add an & to the command line to launch as a background process.
|
That's the first thing I tried, but it doesn't work. When I logoff, the process is killed.
|
I'm not sure of this but it should work:
1. start the app with an appended & to send it to the background 2. run the command "jobs" to get the jobnumber of the started app. 3. run the command "disown jobnumber" to detach it from the shell completely. /Åke |
You need the nohup cmd to disconnect it from the terminal, as well as & thus:
nohup myprog & |
All times are GMT -5. The time now is 12:04 AM. |