pytent / pytentd

Python implementation of the tent.io server protocol
http://pytent.github.com/pytentd/
Other
23 stars 4 forks source link

Detached Mode for the tentd server #13

Closed SoftlySplinter closed 11 years ago

SoftlySplinter commented 11 years ago

Running tentd -d should run the server in a background process.

ravenscroftj commented 11 years ago

That should be fairly easy to do. Python has pretty good support for process forking and stuff. I'll take a look at this at some point.

ravenscroftj commented 11 years ago

This has been implemented in 4ad69b4 you can run with -d to daemonize and -k to kill a daemonized process.

if you run -d twice without killing the previous version you'll get an error and if you run -k without an existing tentd instance you'll get an error too.

Depends on daemonize module as specified in setup.py

borntyping commented 11 years ago

I've improved the argument parser for this in 6f9b83c and 2ae9428. Daemon mode now gets it's own subcommand, and the server can be started and stopped with tentd daemon --start and tentd daemon --kill. --stop may be better, thinking about it.