aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nsd/0010-stop-unlink-pid-error.patch
blob: 24175df3373c4d0c9ed4c9164f1e5c16edf1000b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
This patch prevents nsd from attempting to unlink the pidfile on nsd
shutdown.  The reason for this is because we get a permission denied
error in nsd.log when it attempts to do so.

I think this is needed because of how normal OpenRC init scripts are
designed and handled.

See the included /etc/init.d/nsd (nsd.initd) for my conversion of the
nsdc script that's normally distributed with nsd.  The included nsdc
script is a wrapper for the converted OpenRC init script, designed to
maintain compatibility.

Matt Smith <msmith@alpinelinux.org>


--- a/server.c
+++ b/server.c
@@ -1167,7 +1167,7 @@
 	close(fd);
 
 	/* Unlink it if possible... */
-	unlinkpid(nsd->pidfile);
+	//unlinkpid(nsd->pidfile);
 
 	if(reload_listener.fd > 0) {
 		sig_atomic_t cmd = NSD_QUIT;