aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/diff.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-10-27 19:46:41 -0400
committerW. Trevor King <wking@tremily.us>2012-10-28 16:17:39 -0400
commita9464b2d7d6a5eeaf464178ac76a8338fd3e5768 (patch)
tree32fcf01738215338b7583bad44460e896396f99e /libbe/diff.py
parenteb237a34da6a17c06d1c25ad9609b80fdc88b595 (diff)
downloadbugseverywhere-a9464b2d7d6a5eeaf464178ac76a8338fd3e5768.tar.gz
util:wsgi: add --daemon, --pidfile, and --logfile
This allows you to manage BE servers from inetd scripts, etc. Shortcomings of the current implementation: * ServerCommand._daemonize() currently only sets a SIGTERM handler and double forks. If you want to do this right, see PEP 3143. Unfortunately, the PEP seems to have stalled, python-daemon appears unmaintained, and I don't care enough at the moment to do this right. * ServerCommand._get_pidfile() races between checking for an existing PID file and claiming the file itself. It is possible that two processes would check around the same time, and both see no existing file. Then they would both open the PID file and write their pid, without noticing that the other process was contending for the file. Solving this requires file locking, which is difficult to do portably. This shouldn't be an issue in normal operation, where each server will be using its own PID file path.
Diffstat (limited to 'libbe/diff.py')
0 files changed, 0 insertions, 0 deletions