summaryrefslogtreecommitdiff
path: root/libdaemon
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2015-05-12 09:37:19 +0200
committerOndrej Kozina <okozina@redhat.com>2015-05-12 17:16:24 +0200
commitcdb7ce6f17e01821268c38ec10fed65f0400cc55 (patch)
treeb372717428ba0567a48df9813833b7e1d13c7b64 /libdaemon
parent100daa7fd882ee4ba8626930283340ed05219470 (diff)
downloadlvm2-cdb7ce6f17e01821268c38ec10fed65f0400cc55.tar.gz
libdaemon: shutdown on idle also in non-systemd environment
Diffstat (limited to 'libdaemon')
-rw-r--r--libdaemon/server/daemon-server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 1869956fe..5b1aff1c5 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -82,12 +82,12 @@ static void _exit_handler(int sig __attribute__((unused)))
static int _is_idle(daemon_state s)
{
- return _systemd_activation && s.idle && s.idle->is_idle && !s.threads->next;
+ return s.idle && s.idle->is_idle && !s.threads->next;
}
static struct timeval *_get_timeout(daemon_state s)
{
- return (_systemd_activation && s.idle) ? s.idle->ptimeout : NULL;
+ return s.idle ? s.idle->ptimeout : NULL;
}
static void _reset_timeout(daemon_state s)