smetj/nscaweb — Issue #2: NSCAweb fails to remove PID file under normal termination conditions
Author: smetj
Created: 2011-11-09 20:18:35+00:00
State: open

Hello,
Thanks for your work on this tool, I have found it to be much more flexible then the original NSCA. I have been looking at doing log rotation with NSCAwebs logs and noticed that it does not seem to clean up its PID file under a number of "normal" conditions. I first noticed this when I sent the program a SIGHUP (it does not appear to handle it) so it terminated - which is the default action. When it did, the PID was left and had to be manually deleted before the program could be restarted. Same with a SIGKILL. The specific step-by-step process is below:

1. Start NSCAweb (using SSL and debug mode, I am running it under daemontools and do not want it to fork)
2. Send a SIGHUP or a SIGKILL to the process (process terminates, PID file remains)

System Info:
FreeBSD 8.1
Python 2.7.2
Cherrypy 3.2.0

PS. Although not specifically a bug it would be nice (from a log rotation perspective) if a SIGHUP caused nscaweb to recreate the log file (or at least, update the file handles and write to a new file after a rotation takes place) rather than terminate.

Thanks

Erik Sejr (hpx-a) on 2011-11-07