Pedro F. Giffuni
5e53a4f90f
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
Mariusz Zaborski
73979478cc
Introduce the flopenat(3) function.
...
Reviewed by: des, emaste
Differential Revision: https://reviews.freebsd.org/D11690
2017-08-04 14:24:24 +00:00
Conrad Meyer
33d19692e8
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
Dag-Erling Smørgrav
4e2825545b
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
Dag-Erling Smørgrav
5649afd028
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
Dag-Erling Smørgrav
0e25c55a95
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
Dag-Erling Smørgrav
80de06ed6b
Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.
2008-10-20 18:02:16 +00:00
Dag-Erling Smørgrav
062044ebbe
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
Dag-Erling Smørgrav
7eb198c642
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
Dag-Erling Smørgrav
4b5b992bba
Nit: avoid shadowing truncate(2) with a local variable.
2007-05-23 12:09:33 +00:00
Dag-Erling Smørgrav
400f772943
Fix stupid braino in previous commit.
2007-05-23 10:06:03 +00:00
Dag-Erling Smørgrav
d75d56060e
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
Dag-Erling Smørgrav
8f9085389f
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
Dag-Erling Smørgrav
b252bedcc9
Remove superfluous unexpanded RCS tag.
2007-05-10 14:56:07 +00:00
Dag-Erling Smørgrav
3dea593400
DTRT when O_NONBLOCK is specified.
...
MFC after: 3 weeks
2007-05-10 14:52:57 +00:00
Dag-Erling Smørgrav
9667055264
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