*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: pidfile | Section: 3 | Source: OpenBSD | File: pidfile.3
PIDFILE(3) FreeBSD Library Functions Manual PIDFILE(3) NAME pidfile - write a daemon pid file SYNOPSIS #include <util.h> int pidfile(const char *basename); DESCRIPTION pidfile() writes a file containing the process ID of the program to the /var/run directory. The file name has the form /var/run/basename.pid. If the basename argument is NULL, pidfile will determine the program name and use that instead. 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. RETURN VALUES pidfile() returns 0 on success and -1 on failure. SEE ALSO atexit(3) HISTORY The pidfile function call appeared in OpenBSD 3.0. CAVEATS If pidfile() is called multiple times with different basename, only the last pidfile will be removed upon exit. pidfile() uses atexit() to ensure the pidfile is unlinked at program exit. However, programs that use the _exit() function (for example, in signal handlers) will not trigger this behaviour. FreeBSD 14.1-RELEASE-p8 June 5, 2013 FreeBSD 14.1-RELEASE-p8

Navigation Options