equal
deleted
inserted
replaced
62 else: |
62 else: |
63 time.sleep(0.1) |
63 time.sleep(0.1) |
64 os.kill(pid, 0) |
64 os.kill(pid, 0) |
65 logfn('# Daemon process %d is stuck - really killing it' % pid) |
65 logfn('# Daemon process %d is stuck - really killing it' % pid) |
66 os.kill(pid, signal.SIGKILL) |
66 os.kill(pid, signal.SIGKILL) |
67 except OSError, err: |
67 except OSError as err: |
68 if err.errno != errno.ESRCH: |
68 if err.errno != errno.ESRCH: |
69 raise |
69 raise |
70 |
70 |
71 def killdaemons(pidfile, tryhard=True, remove=False, logfn=None): |
71 def killdaemons(pidfile, tryhard=True, remove=False, logfn=None): |
72 if not logfn: |
72 if not logfn: |