diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-09-20 14:02:44 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-09-21 13:27:50 -0300 |
| commit | e4e451ce15d0970e41cb2c1b5ee65f16e3f64683 (patch) | |
| tree | 17e90f0181698aba447b05fbbcd25cacad639e8c /lib/pid_output.c | |
| parent | 8b1450b94d4333436b4461a0afe38a23ae023741 (diff) | |
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>
Diffstat (limited to 'lib/pid_output.c')
| -rw-r--r-- | lib/pid_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pid_output.c b/lib/pid_output.c index e2e4434150..9a7307bc4f 100644 --- a/lib/pid_output.c +++ b/lib/pid_output.c @@ -57,7 +57,8 @@ pid_t pid_output(const char *path) lock.l_whence = SEEK_SET; 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); } |
