Commit Graph

16 Commits

Author SHA1 Message Date
pfg
260ba0bff1 lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-26 02:00:33 +00:00
oshogbo
452a1fd625 Introduce the flopenat(3) function.
Reviewed by:	des, emaste
Differential Revision:	https://reviews.freebsd.org/D11690
2017-08-04 14:24:24 +00:00
cem
934cc45c72 Remove a death threat from the FreeBSD sources
Reported by:	koobs@, araujo@, linimon@, bjk@, emaste@, jhb@, ngie@, cem@
Maintainer timeout:	des@
2016-12-01 02:21:36 +00:00
des
bf4eabbbec Add a warning against modifying this code without understanding it, and
an example of how not to make it more portable.  I've had this lying
around uncommitted since 2009...
2016-11-24 14:50:21 +00:00
des
94e760567d 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.
2009-06-06 18:47:03 +00:00
des
526ffc2acc Diff reduction against Varnish, including one important fix: use a shared
lock if the file is opened with O_RDONLY.
2008-10-20 18:11:30 +00:00
des
fd059e9b04 Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks. 2008-10-20 18:02:16 +00:00
des
28682dd29a Back out previous commit until I figure out why my regression test fails.
Approved by:	re (kensmith)
2007-08-03 09:20:28 +00:00
des
3cfbe77a3e Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.
Approved by:	re (kensmith)
2007-08-03 06:32:45 +00:00
des
7e2e8064f7 Nit: avoid shadowing truncate(2) with a local variable. 2007-05-23 12:09:33 +00:00
des
aac7a2ca82 Fix stupid braino in previous commit. 2007-05-23 10:06:03 +00:00
des
253a9fb8b6 If (flags & O_TRUNC), don't truncate the file until we've successfully
locked it.

MFC after:	3 weeks
2007-05-23 08:12:34 +00:00
des
ced6c23397 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.
2007-05-10 15:01:42 +00:00
des
2c5ccfbba9 Remove superfluous unexpanded RCS tag. 2007-05-10 14:56:07 +00:00
des
50d71f5464 DTRT when O_NONBLOCK is specified.
MFC after:	3 weeks
2007-05-10 14:52:57 +00:00
des
5d25ea6b62 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
2007-05-10 14:43:31 +00:00