Coder Social home page Coder Social logo

Error on exit about daemonize HOT 5 CLOSED

citosid avatar citosid commented on August 25, 2024
Error on exit

from daemonize.

Comments (5)

 avatar commented on August 25, 2024

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.

citosid avatar citosid commented on August 25, 2024

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.

 avatar commented on August 25, 2024

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.

thesharp avatar thesharp commented on August 25, 2024

Hey @citosid

Could you try your thing with the lastest code from master or 2.4.3 release from PyPI?

from daemonize.

citosid avatar citosid commented on August 25, 2024

Thank you. Will test.

from daemonize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.