mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 16:39:33 +00:00
lib: log error details if F_SETLK fails
Somehow F_SETLK was failing for me a couple of days ago, and not being able to see the errno value was frustrating. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
8b1450b94d
commit
e4e451ce15
@ -57,7 +57,8 @@ pid_t pid_output(const char *path)
|
|||||||
lock.l_whence = SEEK_SET;
|
lock.l_whence = SEEK_SET;
|
||||||
|
|
||||||
if (fcntl(fd, F_SETLK, &lock) < 0) {
|
if (fcntl(fd, F_SETLK, &lock) < 0) {
|
||||||
zlog_err("Could not lock pid_file %s, exiting", path);
|
zlog_err("Could not lock pid_file %s (%s), exiting",
|
||||||
|
path, safe_strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user