History log of /freebsd-10.1-release/lib/libutil/flopen.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 193591 06-Jun-2009 des

Revert (once again, and hopefully for the last time) to flock(2) locks.
The problem with fcntl(2) locks is that they are not inherited by child
processes. This breaks pidfile(3), where the common idiom is to open
and lock the PID file before daemonizing.


# 184094 20-Oct-2008 des

Diff reduction against Varnish, including one important fix: use a shared
lock if the file is opened with O_RDONLY.


# 184093 20-Oct-2008 des

Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.


# 171706 03-Aug-2007 des

Back out previous commit until I figure out why my regression test fails.

Approved by: re (kensmith)


# 171705 03-Aug-2007 des

Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.

Approved by: re (kensmith)


# 169899 23-May-2007 des

Nit: avoid shadowing truncate(2) with a local variable.


# 169897 23-May-2007 des

Fix stupid braino in previous commit.


# 169894 23-May-2007 des

If (flags & O_TRUNC), don't truncate the file until we've successfully
locked it.

MFC after: 3 weeks


# 169450 10-May-2007 des

Well gag me with a spoon... I'm so used to working at high WARNS levels
that I make stupid fundamental mistakes like this when I don't.


# 169449 10-May-2007 des

Remove superfluous unexpanded RCS tag.


# 169447 10-May-2007 des

DTRT when O_NONBLOCK is specified.

MFC after: 3 weeks


# 169446 10-May-2007 des

I'm tired of seeing this done incorrectly and non-portably, so add a
flopen(3) function which reliably opens and locks a file.

MFC after: 3 weeks