aboutsummaryrefslogtreecommitdiff
path: root/lib/libutil/flopen.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove my middle name.Dag-Erling Smørgrav2023-08-171-1/+1
|
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* lib: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-261-0/+2
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326219
* Introduce the flopenat(3) function.Mariusz Zaborski2017-08-041-8/+28
| | | | | | | | Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D11690 Notes: svn path=/head/; revision=322054
* Remove a death threat from the FreeBSD sourcesConrad Meyer2016-12-011-5/+9
| | | | | | | | Reported by: koobs@, araujo@, linimon@, bjk@, emaste@, jhb@, ngie@, cem@ Maintainer timeout: des@ Notes: svn path=/head/; revision=309344
* Add a warning against modifying this code without understanding it, andDag-Erling Smørgrav2016-11-241-1/+17
| | | | | | | | an example of how not to make it more portable. I've had this lying around uncommitted since 2009... Notes: svn path=/head/; revision=309109
* Revert (once again, and hopefully for the last time) to flock(2) locks.Dag-Erling Smørgrav2009-06-061-8/+5
| | | | | | | | | 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. Notes: svn path=/head/; revision=193591
* Diff reduction against Varnish, including one important fix: use a sharedDag-Erling Smørgrav2008-10-201-12/+12
| | | | | | | lock if the file is opened with O_RDONLY. Notes: svn path=/head/; revision=184094
* Reimplement flopen(3) using fcntl(2) locks instead of flock(2) locks.Dag-Erling Smørgrav2008-10-201-5/+7
| | | | Notes: svn path=/head/; revision=184093
* Back out previous commit until I figure out why my regression test fails.Dag-Erling Smørgrav2007-08-031-7/+4
| | | | | | | Approved by: re (kensmith) Notes: svn path=/head/; revision=171706
* Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.Dag-Erling Smørgrav2007-08-031-4/+7
| | | | | | | Approved by: re (kensmith) Notes: svn path=/head/; revision=171705
* Nit: avoid shadowing truncate(2) with a local variable.Dag-Erling Smørgrav2007-05-231-3/+3
| | | | Notes: svn path=/head/; revision=169899
* Fix stupid braino in previous commit.Dag-Erling Smørgrav2007-05-231-1/+1
| | | | Notes: svn path=/head/; revision=169897
* If (flags & O_TRUNC), don't truncate the file until we've successfullyDag-Erling Smørgrav2007-05-231-1/+11
| | | | | | | | | locked it. MFC after: 3 weeks Notes: svn path=/head/; revision=169894
* Well gag me with a spoon... I'm so used to working at high WARNS levelsDag-Erling Smørgrav2007-05-101-0/+4
| | | | | | | that I make stupid fundamental mistakes like this when I don't. Notes: svn path=/head/; revision=169450
* Remove superfluous unexpanded RCS tag.Dag-Erling Smørgrav2007-05-101-2/+0
| | | | Notes: svn path=/head/; revision=169449
* DTRT when O_NONBLOCK is specified.Dag-Erling Smørgrav2007-05-101-4/+7
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=169447
* I'm tired of seeing this done incorrectly and non-portably, so add aDag-Erling Smørgrav2007-05-101-0/+91
flopen(3) function which reliably opens and locks a file. MFC after: 3 weeks Notes: svn path=/head/; revision=169446