Author: des
Date: Mon Oct 20 17:41:08 2008
New Revision: 184091
URL: http://svn.freebsd.org/changeset/base/184091
Log:
There is no point in releasing a lock on a file which we've unlinked and
are about to close, so don't. As a bonus, pidfile_remove(3) will now
work with an fcntl(2)-based flopen(3).
Modified:
head/lib/libutil/pidfile.c
Modified: head/lib/libutil/pidfile.c
==============================================================================
--- head/lib/libutil/pidfile.c Mon Oct 20 17:26:30 2008 (r184090)
+++ head/lib/libutil/pidfile.c Mon Oct 20 17:41:08 2008 (r184091)
@@ -231,10 +231,6 @@ _pidfile_remove(struct pidfh *pfh, int f
if (unlink(pfh->pf_path) == -1)
error = errno;
- if (flock(pfh->pf_fd, LOCK_UN) == -1) {
- if (error == 0)
- error = errno;
- }
if (close(pfh->pf_fd) == -1) {
if (error == 0)
error = errno;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"