public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/libdaemon/server daemon-server.c
@ 2012-03-16 21:30 prajnoha
  0 siblings, 0 replies; 2+ messages in thread
From: prajnoha @ 2012-03-16 21:30 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2012-03-16 21:30:54

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

Log message:
	Do exit if LISTEN_PID environment variable not correct during systemd handover.

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

--- LVM2/libdaemon/server/daemon-server.c	2012/03/14 15:51:52	1.5
+++ LVM2/libdaemon/server/daemon-server.c	2012/03/16 21:30:53	1.6
@@ -177,7 +177,7 @@
 	env_pid = strtoul(e, &p, 10);
 	if (errno || !p || *p || env_pid <= 0 ||
 	    getpid() != (pid_t) env_pid)
-		;
+		goto out;
 
 	/* LISTEN_FDS must be 1 and the fd must be a socket! */
 	if (!(e = getenv(SD_LISTEN_FDS_ENV_VAR_NAME)))


^ permalink raw reply	[flat|nested] 2+ messages in thread

* LVM2/libdaemon/server daemon-server.c
@ 2012-03-08 14:54 prajnoha
  0 siblings, 0 replies; 2+ messages in thread
From: prajnoha @ 2012-03-08 14:54 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@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

--- LVM2/libdaemon/server/daemon-server.c	2012/03/01 21:12:40	1.3
+++ LVM2/libdaemon/server/daemon-server.c	2012/03/08 14:54:05	1.4
@@ -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");
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-16 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 21:30 LVM2/libdaemon/server daemon-server.c prajnoha
  -- strict thread matches above, loose matches on Subject: below --
2012-03-08 14:54 prajnoha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).