From: prajnoha@sourceware.org <prajnoha@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW_DM daemons/dmeventd/dmeventd.c
Date: 15 Mar 2012 08:45:56 -0000 [thread overview]
Message-ID: <20120315084556.3092.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha at sourceware.org 2012-03-15 08:45:56
Modified files:
. : WHATS_NEW_DM
daemons/dmeventd: dmeventd.c
Log message:
Remove dmeventd fifos on exit if they are not managed by systemd.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.594&r2=1.595
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.98&r2=1.99
--- LVM2/WHATS_NEW_DM 2012/03/14 15:51:51 1.594
+++ LVM2/WHATS_NEW_DM 2012/03/15 08:45:55 1.595
@@ -1,5 +1,6 @@
Version 1.02.75 -
================================
+ Remove dmeventd fifos on exit if they are not managed by systemd.
Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.
Do not run a new dmeventd instance on restart if there's no existing one.
Make the time window for reading fifo longer 5sec (1.02.73).
--- LVM2/daemons/dmeventd/dmeventd.c 2012/03/14 15:51:51 1.98
+++ LVM2/daemons/dmeventd/dmeventd.c 2012/03/15 08:45:55 1.99
@@ -1741,10 +1741,18 @@
}
#endif
-static void remove_lockfile(void)
+static void _remove_files_on_exit(void)
{
if (unlink(DMEVENTD_PIDFILE))
perror(DMEVENTD_PIDFILE ": unlink failed");
+
+ if (!_systemd_activation) {
+ if (unlink(DM_EVENT_FIFO_CLIENT))
+ perror(DM_EVENT_FIFO_CLIENT " : unlink failed");
+
+ if (unlink(DM_EVENT_FIFO_SERVER))
+ perror(DM_EVENT_FIFO_SERVER " : unlink failed");
+ }
}
static void _daemonize(void)
@@ -1955,10 +1963,11 @@
if (dm_create_lockfile(DMEVENTD_PIDFILE) == 0)
exit(EXIT_FAILURE);
- atexit(remove_lockfile);
+ atexit(_remove_files_on_exit);
(void) dm_prepare_selinux_context(NULL, 0);
/* Set the rest of the signals to cause '_exit_now' to be set */
+ signal(SIGTERM, &_exit_handler);
signal(SIGINT, &_exit_handler);
signal(SIGHUP, &_exit_handler);
signal(SIGQUIT, &_exit_handler);
next reply other threads:[~2012-03-15 8:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 8:45 prajnoha [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-24 12:25 LVM2 ./WHATS_NEW_DM daemons/dmeventd/dmeventd.c zkabelac
2012-03-14 11:16 prajnoha
2012-03-01 22:06 zkabelac
2012-03-01 9:50 zkabelac
2011-07-28 13:06 prajnoha
2011-07-28 13:03 prajnoha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120315084556.3092.qmail@sourceware.org \
--to=prajnoha@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.