]> sourceware.org Git - lvm2.git/commitdiff
Do not unlink the socket on daemon shutdown if activation is done via systemd.
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 8 Mar 2012 14:54:05 +0000 (14:54 +0000)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 8 Mar 2012 14:54:05 +0000 (14:54 +0000)
libdaemon/server/daemon-server.c

index c93cde9f17072e360b4efc9186dbc83fb3122a34..3cdec3483c333e09c851227afa5f4e89229d598f 100644 (file)
@@ -508,7 +508,8 @@ void daemon_start(daemon_state s)
                                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");
 
This page took 0.03218 seconds and 5 git commands to generate.