mirror of
https://github.com/troglobit/libite.git
synced 2026-10-25 11:54:46 +00:00
README: Update documentation for pidfile() fn
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
805571a7ef
commit
ce3bd4ec8a
1 file changed
+9
-5
@@ -176,20 +176,24 @@ Generic Functions
|
|||||||
|
|
||||||
- `pidfile(basename)`
|
- `pidfile(basename)`
|
||||||
|
|
||||||
Write a daemon pid file. Creates a pidfile in `_PATH_VARRUN` using
|
Create a daemon PID file in `_PATH_VARRUN` using either `basename` or,
|
||||||
either `basename` or, if `basename` is `NULL`, `__progname`. The
|
if `basename` is `NULL`, `__progname`. The file name has the form
|
||||||
file name has the form `/var/run/basename.pid`.
|
`/var/run/basename.pid`.
|
||||||
|
|
||||||
Use this function to create a pid file for your daemon when it is
|
Use this function to create a PID file for your daemon when it is
|
||||||
ready to receive signals. A client application may poll for the
|
ready to receive signals. A client application may poll for the
|
||||||
existence of this file, so make sure to have your signal handlers
|
existence of this file, so make sure to have your signal handlers
|
||||||
properly setup before calling this function.
|
properly setup before calling this function.
|
||||||
|
|
||||||
The pidfile is removed when the program exits, using an `atexit()`
|
The pidfile is removed when the program exits, using an `atexit()`
|
||||||
handler. However, depending on how the program terminates the file
|
handler. However, depending on how the program terminates the file
|
||||||
may still exist even though the program is no longer running. This
|
may still exist even though the program is no longer running. This
|
||||||
is only a problem for clients.
|
is only a problem for clients.
|
||||||
|
|
||||||
|
Calling this function multiple times updates the mtime of the file.
|
||||||
|
Only one `atexit()` handler is created, regardless of the amount of
|
||||||
|
times the function is called.
|
||||||
|
|
||||||
See below for link to OpenBSD man page.
|
See below for link to OpenBSD man page.
|
||||||
|
|
||||||
- `pidfile_read(pidfile)`
|
- `pidfile_read(pidfile)`
|
||||||
|
|||||||
Reference in new issue
Block a user