Mercurial > hg
comparison tests/killdaemons.py @ 37846:89793289c891
tests: remove pid file by default
Previously, killdaemons.py would kill PIDs listed in a file then
leave the file lingering around.
If the PIDs are killed, then there's no point leaving the PID file
around. In the worst case, a later invocation of killdaemons.py
(run-tests.py invokes killdaemons.py after running a test) could kill
a separate process whose PID conflicted with a previously-killed
process. By removing the PID file, we eliminate this possibility.
Some tests were manually removing the PID file after calling
killdaemons.py. So we update these tests to not do this.
Differential Revision: https://phab.mercurial-scm.org/D3443
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 05 May 2018 19:00:03 -0700 |
parents | ed1f376090cd |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
37845:b4b7427b5786 | 37846:89793289c891 |
---|---|
122 if len(sys.argv) > 1: | 122 if len(sys.argv) > 1: |
123 path, = sys.argv[1:] | 123 path, = sys.argv[1:] |
124 else: | 124 else: |
125 path = os.environ["DAEMON_PIDS"] | 125 path = os.environ["DAEMON_PIDS"] |
126 | 126 |
127 killdaemons(path) | 127 killdaemons(path, remove=True) |