mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 17:06:28 +00:00
lib: When we can't lock the pid file provide a meaningfull message
Give a hint to the end user that the daemon may already be running. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
42a75fec9d
commit
8c5ff531a1
@ -60,7 +60,7 @@ pid_t pid_output(const char *path)
|
|||||||
|
|
||||||
if (fcntl(fd, F_SETLK, &lock) < 0) {
|
if (fcntl(fd, F_SETLK, &lock) < 0) {
|
||||||
flog_err_sys(EC_LIB_SYSTEM_CALL,
|
flog_err_sys(EC_LIB_SYSTEM_CALL,
|
||||||
"Could not lock pid_file %s (%s), exiting",
|
"Could not lock pid_file %s (%s), exiting. Please ensure that the daemon is not already running",
|
||||||
path, safe_strerror(errno));
|
path, safe_strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user