Comments (5)
1 - sys.exit(0)
makes the python application terminates. I think you confusing it with the exit(self)
.
2 - did you checked that the encoder.pid is being created? If it's created than something else is removing it before you can reach the sigterm or exit handlers
from daemonize.
The PID is created, and it is deleted. I debug the app, and it is deleted at sigterm
method. Then, the self.exit
method is executed and that tries to delete again the file that was deleted by the self.sigterm
method.
from daemonize.
well how the hell you can call self.exit
after a sys.exit(0)
? Anyways just insert on your build:
try:
os.remove(self.pid)
except OSError:
print('pid file already removed')
from daemonize.
Hey @citosid
Could you try your thing with the lastest code from master or 2.4.3 release from PyPI?
from daemonize.
Thank you. Will test.
from daemonize.
Related Issues (20)
- Passing Parameter HOT 1
- Provide a callback function for a graceful shutdown
- Thread stopped when daemonize start HOT 2
- Calling to exit() doesn't seem to work
- Calls to self.log.warn() should be self.log.warning() HOT 1
- Passing Arguments HOT 1
- Why this lib doesnt fork twice? HOT 2
- in foreground mode, logging is still done to the syslog
- Error when logging was not initialize yet HOT 2
- Deprecation warning for "logger.warn" still exists on pypi HOT 1
- Daemonized script doesn't seem to be running HOT 2
- Testsuite fails to run if there is no /usr/bin/python HOT 2
- python3.8.3 has the following errors
- DNS lookup before fork causes lookup failure after fork on OSX HOT 1
- Daemonize does not work with requests library HOT 3
- Daemonizing multiple functions at once HOT 1
- When closing descriptors, set some fixed (configurable?) cap HOT 2
- Set process name
- Ignored "SystemExit: 0" exception on exit
- Is this project abandoned? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daemonize.