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:
Donald Sharp 2018-09-22 14:18:52 -04:00
parent 42a75fec9d
commit 8c5ff531a1

View File

@ -60,7 +60,7 @@ pid_t pid_output(const char *path)
if (fcntl(fd, F_SETLK, &lock) < 0) {
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));
exit(1);
}