
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 0.56 KB | hits: 7 | expires: Never
python: how to write daemon in Linux
respawn
respawn limit 5 300
exec python /path/to/a.py
nohup python a.py &
$ screen
$ screen -S backup
Ctrl+a d command (press and hold Ctrl, press and hold a, then press d) to detach from the session.
$ screen -ls
$ screen -R
ctrl+a d - detach the screen, and let it run without user interface (as described above)
ctrl+a c - create a new terminal
ctrl+a A - set the name of the current terminal
ctrl+a n - switch to next terminal
ctrl+a p - switch to prev terminal
ctrl+a " - list the of terminals