This repository was archived by the owner on Sep 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
This repository was archived by the owner on Sep 8, 2024. It is now read-only.
Documentation does not match implementation #2630
Copy link
Copy link
Closed
Description
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.
mycroft-core/mycroft/lock/__init__.py
Lines 129 to 147 in aca6a18
# | |
# 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
Labels
No labels