]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make stop.pl wait for lock file cleanup
authorMichał Kępień <michal@isc.org>
Tue, 19 Mar 2019 09:26:36 +0000 (10:26 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 19 Mar 2019 10:03:46 +0000 (11:03 +0100)
commit537765df80916c159fb55a997ed69d62517839d4
tree52a8d8fa1459c468e8b47e8c8bf5926637d62bbc
parentebedeffa25eb390e2aeb7ba81a2f5b07f236ea07
Make stop.pl wait for lock file cleanup

bin/tests/system/stop.pl only waits for the PID file to be cleaned up
while named cleans up the lock file after the PID file.  Thus, the
aforementioned script may consider a named instance to be fully shut
down when in fact it is not.

Fix by also checking whether the lock file exists when determining a
given instance's shutdown status.  This change assumes that if a named
instance uses a lock file, it is called "named.lock", and that if an
lwresd instance uses a lock file, it is called "lwresd.lock".

Also rename clean_pid_file() to pid_file_exists(), so that it is called
more appropriately (it does not clean up the PID file itself, it only
returns the server's identifier if its PID file is not yet cleaned up).

(cherry picked from commit c787a539d2a931ba9023677c1c269ed191455512)
bin/tests/system/stop.pl