]> 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 09:00:46 +0000 (11:00 +0200)
Upon named shutdown, the lock file should not just be unlocked but also
removed.

(cherry picked from commit c506077da54e92ddb6220bd118ff817a9248c4e8)

bin/named/win32/os.c

index f89c50da4127a056956717b8a7e76aa746c1abcf..5d502237b0d440303ab1e361247e1e95c76e5c17 100644 (file)
@@ -350,9 +350,9 @@ ns_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 */
 }