You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base issue is that daemon.py uses atexit, which states in its documentation:
The functions registered via this module are not called when the program is killed by a signal not handled by Python
Since SIGTERM is the standard POSIX way to ask a daemon to quit, and since daemons are supposed to clean up after themselves, this design requires unusual and fragile behavior in init scripts. Specifically, I noticed that the init script has this line:
rm -f $PIDFILE
That's generally considered to be a bad practice.
The text was updated successfully, but these errors were encountered:
It looks like there is some information missing from your ticket that will be needed in order to process it properly. Please take a look at the Contribution Guidelines and the page How to file a bug report on the project wiki, which will tell you exactly what your ticket has to contain in order to be processable.
If you did not intend to report a bug, please take special note of the title format to use as described in the Contribution Guidelines.
I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2015-01-24 09:20) I'll close this ticket so it doesn't clutter the bug tracker.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
What were you doing?
Writing a rc.d script for FreeBSD.
What did you expect to happen?
OctoPrint would clean up its pidfile after a graceful exit.
What happened instead?
The pidfile remained in place. This caused an "already running" error to occur when I attempted to run the daemon again.
Branch & Commit or Version:
devel 3d5fdf2
Printer model & used firmware incl. version
Not relevant.
Link to octoprint.log on gist.github.com or pastebin.com:
Not relevant.
Link to contents of terminal tab on gist.github.com or pastebin.com:
https://gist.github.com/rspeed/d37acd6fc447eac1cb3e
Notes
The base issue is that
daemon.py
usesatexit
, which states in its documentation:Since SIGTERM is the standard POSIX way to ask a daemon to quit, and since daemons are supposed to clean up after themselves, this design requires unusual and fragile behavior in init scripts. Specifically, I noticed that the init script has this line:
That's generally considered to be a bad practice.
The text was updated successfully, but these errors were encountered: