mirror of
https://github.com/troglobit/libite.git
synced 2026-11-02 13:10:33 +00:00
Update pidfile() documentation and add unit test for __pidfile_name
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
253460b4b8
commit
5d07594709
3 files changed
+15
-5
No files matched your search
@@ -177,8 +177,10 @@ Generic Functions
|
||||
- `pidfile(basename)`
|
||||
|
||||
Create a daemon PID file in `_PATH_VARRUN` using either `basename` or,
|
||||
if `basename` is `NULL`, `__progname`. The file name has the form
|
||||
`/var/run/basename.pid`.
|
||||
if `basename` is `NULL`, `__progname`. The resulting file name is
|
||||
available to the user as a read-only pointer:
|
||||
|
||||
extern char *__pidfile_name;
|
||||
|
||||
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
|
||||
@@ -242,7 +244,9 @@ The following are the popular OpenBSD string functions.
|
||||
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/pidfile.3
|
||||
|
||||
**Note:** this version of `pidfile()` has been extended to handle it
|
||||
being called multiple times. See previous section for details.
|
||||
being called multiple times, and also to export the path to the PID
|
||||
file `__pidfile_name`, similar to `__progname`. See previous section
|
||||
for details.
|
||||
|
||||
- `strlcpy(dst, src, len)`
|
||||
|
||||
|
||||
Reference in new issue
Block a user