mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdaemon: suggest daemon already running
when dm_creat_lockfile fails, it's probably due to another instance is holding the same pid file...
This commit is contained in:
parent
c0d30da609
commit
f653b123cf
@ -568,8 +568,10 @@ void daemon_start(daemon_state s)
|
|||||||
* NB. Take care to not keep stale locks around. Best not exit(...)
|
* NB. Take care to not keep stale locks around. Best not exit(...)
|
||||||
* after this point.
|
* after this point.
|
||||||
*/
|
*/
|
||||||
if (dm_create_lockfile(s.pidfile) == 0)
|
if (dm_create_lockfile(s.pidfile) == 0) {
|
||||||
|
ERROR(&s, "Failed to acquire lock on %s. Already running?\n", s.pidfile);
|
||||||
exit(EXIT_ALREADYRUNNING);
|
exit(EXIT_ALREADYRUNNING);
|
||||||
|
}
|
||||||
|
|
||||||
(void) dm_prepare_selinux_context(NULL, 0);
|
(void) dm_prepare_selinux_context(NULL, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user