summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemons/lvmpolld/lvmpolld-data-utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/daemons/lvmpolld/lvmpolld-data-utils.c b/daemons/lvmpolld/lvmpolld-data-utils.c
index 1499e3f59..326139a85 100644
--- a/daemons/lvmpolld/lvmpolld-data-utils.c
+++ b/daemons/lvmpolld/lvmpolld-data-utils.c
@@ -13,6 +13,8 @@
*/
#include <fcntl.h>
+#include <signal.h>
+#include <sys/types.h>
#include <unistd.h>
#include "config-util.h"
@@ -352,6 +354,12 @@ void lvmpolld_thread_data_destroy(void *thread_private)
if (data->pdlv) {
pdst_lock(data->pdlv->pdst);
+ /*
+ * FIXME: skip this step if lvmpolld is activated
+ * by systemd.
+ */
+ if (!pdlv_get_polling_finished(data->pdlv))
+ kill(data->pdlv->cmd_pid, SIGTERM);
pdlv_set_polling_finished(data->pdlv, 1);
pdst_locked_dec(data->pdlv->pdst);
pdst_unlock(data->pdlv->pdst);