Skip to contentSkip to conversation

LVM2/libdaemon/server daemon-server.c

PATCH [email protected] 1 participant 1 message Mar 8, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha at sourceware.org 2012-03-08 14:54:05

Modified files:
libdaemon/server: daemon-server.c

Log message:
Do not unlink the socket on daemon shutdown if activation is done via systemd.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdaemon/server/daemon-server.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4

libdaemon/server/daemon-server.c +2 -1
@@ -508,7 +508,8 @@
 				syslog(LOG_ERR, "Failed to handle a client connection.");
 	}
 
-	if (s.socket_fd >= 0)
+	/* If activated by systemd, do not unlink the socket - systemd takes care of that! */
+	if (!_systemd_activation && s.socket_fd >= 0)
 		if (unlink(s.socket_path))
 			perror("unlink error");