src/rc/rc-misc.c: report error if call to flock() fails

X-Gentoo-Bug: 597390
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=597390
This commit is contained in:
William Hubbs 2016-10-24 12:39:14 -05:00
parent c44c904a61
commit 4fd144c0a6

View File

@ -228,6 +228,7 @@ svc_lock(const char *applet)
if (fd == -1)
return -1;
if (flock(fd, LOCK_EX | LOCK_NB) == -1) {
eerror("Call to flock failed: %s", strerror(errno));
close(fd);
return -1;
}