1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-03 08:22:00 +03:00

libdaemon: shutdown on idle also in non-systemd environment

This commit is contained in:
Ondrej Kozina
2015-05-12 09:37:19 +02:00
parent 100daa7fd8
commit cdb7ce6f17
2 changed files with 3 additions and 2 deletions

View File

@ -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)