diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-07-19 10:32:08 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-07-19 10:32:08 +0000 |
commit | f06b0bccfdb7459be0947a6fd6f726eba4bcf92d (patch) | |
tree | 7fafc5f2d22eaf68c9dcfea5a74fe03d6b0676c8 /daemon.py | |
parent | f1590591451f135ca903e20f24ca5a9d0e7fba14 (diff) | |
parent | b130e74f187b2ba22db6654508a6e7e4c721a16e (diff) | |
download | ewww-f06b0bccfdb7459be0947a6fd6f726eba4bcf92d.tar.gz |
Merge branch 'serve-files' into 'master'
Serve files
See merge request larswirzenius/ewww!7
Diffstat (limited to 'daemon.py')
-rw-r--r-- | daemon.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -65,5 +65,10 @@ def process_exists(pid): # Terminate process. -def terminate_process(pid, signal): - os.kill(pid, signal) +def terminate_process(pid, signalno): + logging.debug(f"Terminating process {pid} with signal {signalno}") + try: + os.kill(pid, signalno) + except ProcessLookupError: + logging.debug("Process did not actually exist (anymore?)") + pass |