have python process run similar to how redis process does (in the background)

Go To StackoverFlow.com


I asked this question on superuser, but haven't gotten a response. Maybe here would of been more appropriate.

When I start my redis server with redis-server, even after I close the terminal or logout the process will still be there when I log back in, but my python bottle server python server.py will turn off if I close to terminal or logout. How do I get similar behavior as redis in python.

2012-04-04 06:05
by Doboy
There is Apache+Mod_WSGI or Cherrypy server and other standalone WSGI servers which run in daemon mode - Jesvin Jose 2012-04-04 06:15


The easy way is to run the process through screen or tmux.

You could also try doing something with e.g. python-daemon on Unix, or various other approaches for running daemons.

2012-04-04 06:08
by Dougal
cool, I was reading up on this and I saw another solution that uses nohup, what is the difference/advantages between using a python-daemon and using nohup python server.py - Doboy 2012-04-04 06:14