summaryrefslogtreecommitdiffstats
path: root/lib/libutil/pidfile.3
Commit message (Collapse)AuthorAgeFilesLines
* Add a comment to the example that pidfile_* functions can handle pfh being NULL.pjd2012-02-081-0/+5
| | | | MFC after: 3 days
* Note that calling pidfile_write(3) multiple times is fine.pjd2012-02-081-1/+4
| | | | MFC after: 3 days
* Remove unnecessary includes from these libutil man pages.ghelmer2012-01-161-1/+0
| | | | Requested by bde (as was the previous commit).
* pidfile_open() no longer uses fcntl() to set the close-on-exec flag.ghelmer2012-01-121-2/+1
|
* Style fixes courtesy of pjd.ghelmer2012-01-101-2/+4
|
* Document that pidfile_open() now sets the FD_CLOEXEC flag on the openghelmer2012-01-101-0/+4
| | | | | file descriptor, and that errors can be returned as a result of the fcntl(2) system call.
* Add pidfile_fileno() to obtain the file descriptor for an openghelmer2012-01-101-2/+28
| | | | pidfile.
* In pidfile_open(), if the pidfile is locked, but empty (PID is not stored yet)pjd2011-10-161-10/+15
| | | | | | | | | | | and the caller requested other process' PID by passing non-NULL pidptr argument, we will wait at most 100ms for the PID to show up in the file and if it won't, we will store -1 in *pidptr. From now on, pidfile_open() function never sets errno to EAGAIN on failure. In collaboration with: des MFC after: 1 week
* Add missing .Ppdes2009-06-061-0/+1
|
* pidfile(3) uses flopen(3) - don't make any assumptions about how thedes2008-10-201-9/+8
| | | | latter is implemented.
* Minor mdoc cleanup: Every sentence should start on its own line.simon2007-10-131-1/+2
|
* When pidfile is already locked and has zero length, do not returnkib2007-10-121-0/+4
| | | | | | | | | | | | | | success and zero pid from pidfile_read(). Return EAGAIN instead. Sleep up to three times for 5 ms while waiting for pidfile to be written. mount(8) does the kill(mountpid, SIGHUP). If mountd pidfile is truncated, that would result in the SIGHUP delivered to the mount' process group instead of the mountd. Found and analyzed by: Peter Holm Tested by: Peter Holm, kris Reviewed by: pjd MFC after: 1 week
* Use `intmax_t' instead of plain `int' for pid_t casts.keramida2006-03-041-3/+3
| | | | | | Useful tips from: ru, bde Approved by: pjd MFC after: 3 days
* - Add a note that passing NULL to pidfile_write(), pidfile_remove() andpjd2006-01-281-3/+13
| | | | | | | pidfile_close() functions is safe. This possibility is used in example code. - Cast pid_t to int. Requested by: yar
* Fix markup, grammar and spelling.ru2005-11-181-32/+44
|
* Pidfiles should be created with permission preventing users from openingpjd2005-09-161-1/+1
| | | | | | | them for reading. When user can open file for reading, he can also flock(2) it, which can lead to confusions. Pointed out by: green
* Add a family of functions for reliable pidfiles handling.pjd2005-08-241-0/+227
Idea from: jmg Discussed on: arch@
OpenPOWER on IntegriCloud