freebsd-skq/lib
ghelmer 10fb6673e8 Using the O_CLOEXEC flag on open(2) caused the pidfile lock to be lost
when the child process execs daemon's target program thanks to flock(2)
semantics. So, we apparently have to leak the open pidfile's file
descriptor to keep the lock for the pidfile(3) functions to work properly.

Test case demonstrated by trociny:

ref8-amd64:/home/trociny% uname -r
8.2-STABLE
ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10
ref8-amd64:/home/trociny% daemon -p /tmp/sleep.pid sleep 10
daemon: process already running, pid: 19799

kopusha:~% uname -r
10.0-CURRENT
kopusha:~% daemon -p /tmp/sleep.pid sleep 10
kopusha:~% daemon -p /tmp/sleep.pid sleep 10
kopusha:~%
2012-02-06 14:11:24 +00:00
..
bind Upgrade to BIND version 9.8.1. Release notes at: 2011-09-03 07:13:45 +00:00
clang Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default, 2012-02-05 23:56:22 +00:00
csu
libalias
libarchive Use contrib sources for building libarchive, tar and cpio. 2011-12-22 08:42:07 +00:00
libauditd
libbegemot
libblocksruntime
libbluetooth
libbsm
libbsnmp Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libbz2
libc Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE which 2012-02-05 20:04:43 +00:00
libc++ Import libc++ / libcxxrt into base. Not build by default yet (use 2011-11-25 20:59:04 +00:00
libcalendar
libcam Replace index() and rindex() calls with strchr() and strrchr(). 2012-01-03 18:51:58 +00:00
libcom_err
libcompat
libcompiler_rt Upgrade libcompiler_rt to upstream revision 147390. 2011-12-31 19:01:48 +00:00
libcrypt
libcxxrt Update libcxxrt to remove the pthread dependency. 2011-11-26 18:46:33 +00:00
libdevinfo
libdevstat Handle memory allocation failures in devstat_getdevs(), devstat_selectdevs(), 2012-01-06 21:28:29 +00:00
libdisk Remove an errant `#define dprintf printf'. It seems to be leftover 2012-01-20 06:59:29 +00:00
libdwarf Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libedit Don't use __P(). 2011-12-13 14:53:26 +00:00
libefi
libelf - change "is is" to "is" or "it is" 2011-10-16 14:30:28 +00:00
libexpat
libfetch Fix two nits in previous commit pointed out by pjd@. 2012-01-23 09:23:07 +00:00
libgeom
libgpib
libgssapi Convert files to UTF-8 and add some copyright markers where missing. 2012-01-07 16:13:56 +00:00
libiconv
libiconv_modules
libipsec In lib/libipsec/policy_token.l, use lex's standard "%option noinput" 2011-12-16 00:01:19 +00:00
libipx
libjail
libkiconv Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
libkse
libkvm Try to avoid ambiguity when sysctl returns ENOMEM additionally 2012-02-01 18:02:13 +00:00
liblzma
libmagic
libmd
libmemstat Cosmetic cleanup: remove #define LIBMEMSTAT used to prevent a nested 2011-09-02 14:10:42 +00:00
libmilter
libmp Fix whitespace inconsistencies found in homegrown Symbol.maps. 2011-10-07 15:05:24 +00:00
libncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
libnetgraph
libngatm
libopie X11BASE has been deprecated for a long time and will die soon 2012-01-09 00:48:19 +00:00
libpam Rev 228065 (change bsd.own.mk -> bsd.init.mk) broke pam_unix.so by causing 2012-01-18 18:26:56 +00:00
libpcap Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libpmc Update PMC events from October 2011 Intel documentation. 2012-01-04 07:58:36 +00:00
libproc
libprocstat Updates to libprocstat(3) and procstat(1) to allow monitoring Capsicum 2011-08-14 00:42:09 +00:00
libradius Add binding support to libradius(3). 2011-12-20 11:13:44 +00:00
librpcsec_gss
librpcsvc
librt Free unused allocation on error. 2011-11-18 09:56:40 +00:00
librtld_db Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libsbuf
libsdp Change the SDP_GET* macros to cast to a const buffer. 2011-10-16 08:45:16 +00:00
libsm Fix typos in the comments about clang warnings in several 2011-12-16 17:02:25 +00:00
libsmb
libsmdb
libsmutil
libstand Replace index() and rindex() calls with strchr() and strrchr(). 2012-01-03 18:51:58 +00:00
libstdthreads Pull up vendor changes to mdoc(7) 2012-01-05 21:36:12 +00:00
libtacplus Bump shared libraries version numbers in preparation for 9.0. 2011-08-28 09:26:48 +00:00
libtelnet
libthr Use getcontextx(3) internal API instead of getcontext(2) to provide 2012-01-21 18:06:18 +00:00
libthread_db In lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrect 2011-12-16 15:00:56 +00:00
libufs Make berase() work on platforms whose kernel lacks DIOCGDELETE ioctl. 2011-12-08 12:31:47 +00:00
libugidfw
libulog Fix whitespace inconsistencies found in homegrown Symbol.maps. 2011-10-07 15:05:24 +00:00
libusb Simplify libusb_open_device_with_vid_pid(): Only set 2011-12-03 16:30:47 +00:00
libusbhid MFprojects/hid: 2011-09-28 14:52:25 +00:00
libutil Using the O_CLOEXEC flag on open(2) caused the pidfile lock to be lost 2012-02-06 14:11:24 +00:00
libvgl Convert files to UTF-8 and add some copyright markers where missing. 2012-01-07 16:13:56 +00:00
libwrap
liby
libypclnt
libz
msun Fix a small nit noted by bde: exp_x should be of type float, not double. 2012-01-20 07:02:42 +00:00
ncurses
Makefile Fix typo in Makefile comment. 2011-12-30 10:45:00 +00:00
Makefile.inc