*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> pidfile (3)              
Title
Content
Arch
Section
 

PIDFILE(3)

Contents


NAME    [Toc]    [Back]

     pidfile - write a daemon pid file

LIBRARY    [Toc]    [Back]

     System Utilities Library (libutil, -lutil)

SYNOPSIS    [Toc]    [Back]

     #include <util.h>

     void
     pidfile(const char *basename);

DESCRIPTION    [Toc]    [Back]

     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.

     Note that only the first invocation of pidfile causes a pid file to be
     written; subsequent invocations have no effect unless a new basename is
     supplied.

SEE ALSO    [Toc]    [Back]

      
      
     atexit(3)

HISTORY    [Toc]    [Back]

     The pidfile function call appeared in NetBSD 1.5.

BSD                              June 5, 1999                              BSD
[ Back ]
 Similar pages
Name OS Title
AFreadmisc IRIX read from / write to / move logical read/write pointer for data in a miscellaneous chunk in an audio file
AFclosefile IRIX close an audio file, update file header if file was opened for write access.
sat_write_filehdr IRIX write audit file header, write close time to audit file header
AFsyncfile IRIX write out a consistent snapshot of an audio file without actually closing the file
efi_fsinit HP-UX write an EFI file system header on a device file
pwrite Tru64 Write to a file
writev HP-UX write on a file
write IRIX write on a file
writev Tru64 Write to a file
puts IRIX Write to a file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service