]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
win32: remove lock file upon shutdown
authorMichał Kępień <michal@isc.org>
Fri, 19 Apr 2019 08:59:41 +0000 (10:59 +0200)
committerMichał Kępień <michal@isc.org>
Fri, 19 Apr 2019 08:59:41 +0000 (10:59 +0200)
Upon named shutdown, the lock file should not just be unlocked but also
removed.

bin/named/win32/os.c

index f302338c66ae3c8064a527bcc26a57bd78fe682a..ec6da58c94e0d1d20043816c912b9c521fca06c9 100644 (file)
@@ -348,9 +348,9 @@ named_os_shutdown(void) {
        if (lockfilefd != -1) {
                (void) UnlockFile((HANDLE) _get_osfhandle(lockfilefd),
                                  0, 0, 0, 1);
-               close(lockfilefd);
-               lockfilefd = -1;
        }
+       cleanup_lockfile();
+
        ntservice_shutdown();   /* This MUST be the last thing done */
 }