Skip to content

Calling to exit() doesn't seem to work #57

Description

@skewty
daemon = Daemonize(app="test_app", pid=pid, action=main, keep_fds=keep_fds)
daemon.start()
daemon.exit()  # this line is never reached because the parent process does a sys.exit(0) after the fork
daemon = Daemonize(app="test_app", pid=pid, action=main, keep_fds=keep_fds)
daemon.exit()  # raises AttributeError when self.logger is None

Since Daemon.exit() also does a sys.exit(0) any subsequent lines of code are never reached either. Shouldn't the sys.exit() calls for the original parent process be left to the user?

Shouldn't logging be initialized in init()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions