summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-10-20 18:00:11 +0000
committerdes <des@FreeBSD.org>2008-10-20 18:00:11 +0000
commit9a22db9431ce7e5719c00e9a183d0d1c6cdce048 (patch)
tree13f62fc64671154e0a59e2c3be9c3ec0ee986e21
parentfef0e9dfaf9a4f8f338a65205bfa66d949534c2b (diff)
downloadFreeBSD-src-9a22db9431ce7e5719c00e9a183d0d1c6cdce048.zip
FreeBSD-src-9a22db9431ce7e5719c00e9a183d0d1c6cdce048.tar.gz
pidfile(3) uses flopen(3) - don't make any assumptions about how the
latter is implemented.
-rw-r--r--lib/libutil/pidfile.317
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3
index a188304..ac8c29d 100644
--- a/lib/libutil/pidfile.3
+++ b/lib/libutil/pidfile.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 22, 2005
+.Dd October 20, 2008
.Dt PIDFILE 3
.Os
.Sh NAME
@@ -51,16 +51,14 @@ The
.Nm pidfile
family of functions allows daemons to handle PID files.
It uses
-.Xr flock 2
+.Xr flopen 3
to lock a pidfile and detect already running daemons.
.Pp
The
.Fn pidfile_open
function opens (or creates) a file specified by the
.Fa path
-argument and locks it with the
-.Xr flock 2
-system call.
+argument and locks it.
If a file can not be locked, a PID of an already running daemon is returned in
the
.Fa pidptr
@@ -233,16 +231,17 @@ function may also fail and set
.Va errno
for any errors specified for the
.Xr close 2 ,
-.Xr flock 2 ,
.Xr fstat 2 ,
.Xr write 2 ,
and
.Xr unlink 2
-calls.
+system calls and the
+.Xr flopen 3
+library function.
.Sh SEE ALSO
-.Xr flock 2 ,
.Xr open 2 ,
-.Xr daemon 3
+.Xr daemon 3 ,
+.Xr flopen 3
.Sh AUTHORS
.An -nosplit
The
OpenPOWER on IntegriCloud