diff options
author | 2001-09-28 20:27:56 +0000 | |
---|---|---|
committer | 2001-09-28 20:27:56 +0000 | |
commit | 6400e21139443cb7cf13d440a403582ed263270d (patch) | |
tree | 49d7c06a2ab1ec2b3a879f147a4c3282248201c7 | |
parent | add pidfile(3) - write a daemon pid file. ok deraadt@, millert@. (diff) | |
download | wireguard-openbsd-6400e21139443cb7cf13d440a403582ed263270d.tar.xz wireguard-openbsd-6400e21139443cb7cf13d440a403582ed263270d.zip |
multiple calls to pidfile(3) are actually ok, but there are problems if you change the basename
-rw-r--r-- | lib/libutil/pidfile.3 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3 index d1e4be08797..84fd391e213 100644 --- a/lib/libutil/pidfile.3 +++ b/lib/libutil/pidfile.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pidfile.3,v 1.1 2001/09/28 20:16:42 jakob Exp $ +.\" $OpenBSD: pidfile.3,v 1.2 2001/09/28 20:27:56 jakob Exp $ .\" $NetBSD: pidfile.3,v 1.2 2001/04/12 22:34:31 sommerfeld Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -61,10 +61,6 @@ The pid file can be used as a quick reference if the process needs to be sent a signal. When the program exits, the pid file will be removed automatically, unless the program receives a fatal signal. -.Pp -Note that only the first invocation of -.Nm -causes a pid file to be written; subsequent invocations have no effect. .Sh RETURN VALUES .Fn pidfile returns 0 on success and -1 on failure. @@ -75,3 +71,9 @@ The .Nm function call appeared in .Ox 3.0 . +.Sh CAVEATS +If +.Fn pidfile +is called multiple times with different +.Ar basename , +only the last pidfile will be removed upon exit. |