Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Documentation does not match implementation #2630

@NoamDev

Description

@NoamDev

The documentation says the file is being deleted, well it is not.
Also the documentation says SIGTERM signal is sent, but actually SIGKILL is sent.
Given that the code works (I guess), I think the documentation is the one requiring change.

#
# Check to see if the PID already exists
# If it does exits perform several things:
# Stop the current process
# Delete the exiting file
def exists(self):
"""
Check to see if the PID lock file currently exists. If it does
than send a SIGTERM signal to the process defined by the value
in the lock file. Catch the keyboard interrupt exception to
prevent propagation if stopped by use of Ctrl-C.
"""
if not os.path.isfile(self.path):
return
with open(self.path, 'r') as L:
try:
os.kill(int(L.read()), SIGKILL)
except Exception as E:
pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions