Remove an unconditional one-second delay after executing kill during
process cleanup. Subsequent torture tests indicate this was likely
unnecessary, but it slowed down testing considerably.
try:
# Stop the running service
os.kill(pid, 15)
try:
# Stop the running service
os.kill(pid, 15)
except ProcessLookupError:
# If there was no process, just remove the stale PID file
os.remove(pidfile)
except ProcessLookupError:
# If there was no process, just remove the stale PID file
os.remove(pidfile)