opnsense-src/lib/libc
John Baldwin cc3d85727d When reopening a stream backed by an open file descriptor, do not close
the existing file descriptor.  Instead, let dup2() atomically close the
old file descriptor when assigning the newly opened file to the same
descriptor.  This closes a race in a multithreaded application where a
concurrent open() could allocate the existing file descriptor in between
the calls to close() and dup2().

PR:		threads/79887
Submitted by:	Dmitrij Tejblum  tejblum of yandex-team.ru
Reviewed by:	davidxu
MFC after:	1 week
2010-12-09 20:28:30 +00:00
..
amd64 Retire the amd64 and i386 specific inline assembly versions of ldexp.c, 2010-09-30 19:20:21 +00:00
arm The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-02 22:16:40 +00:00
compat-43 Powerpc is special here. powerpc and powerpc64 use different ABIs, so 2010-08-24 20:54:43 +00:00
db Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 and 2010-09-12 14:04:05 +00:00
gdtoa Unbreak the build for arm and powerpc. 2008-04-12 14:53:52 +00:00
gen Always set errno to a sane value when pututxline(3) fails. 2010-11-14 18:42:39 +00:00
gmon Provide 64-bit PowerPC support in libc. 2010-07-10 14:45:03 +00:00
i386 libc: Remove the i386 assembler version of strlen(3). 2010-10-01 13:10:11 +00:00
ia64 Remove unneeded stdlib directories. 2009-06-23 14:11:41 +00:00
include Remove some unneeded spaces from the __sym_compat() macro, since newer 2010-11-11 21:36:52 +00:00
inet Merge the resolver part of BIND 9.4.3 into HEAD. 2008-12-14 19:39:53 +00:00
isc Merge BIND 9.4.1 into main chunk. 2007-06-03 17:20:27 +00:00
locale mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
mips Fix PIC_RETURN when abicalls are not defined. 2010-10-24 05:22:07 +00:00
nameser This commit was generated by cvs2svn to compensate for changes in r174223, 2007-12-03 15:07:58 +00:00
net Clang related fixes: 2010-10-13 16:57:06 +00:00
nls Merge from English r198040: add C message catalogue entries for newer 2010-06-20 06:52:10 +00:00
posix1e mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
powerpc The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-02 22:11:14 +00:00
powerpc64 Make sure to specify the alignment of minbrk and curbrk. They were correctly 2010-11-11 22:35:42 +00:00
quad Powerpc is special here. powerpc and powerpc64 use different ABIs, so 2010-08-24 20:54:43 +00:00
regex mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
resolv Add an option to enforce strict RFC 1034 compliance. 2009-05-29 07:34:54 +00:00
rpc Move most of the remaining USD/PSD/SMM papers into share/doc 2010-12-04 10:11:20 +00:00
softfloat Powerpc is special here. powerpc and powerpc64 use different ABIs, so 2010-08-24 20:54:43 +00:00
sparc64 Avoid aliasing which leads to incorrect results when compiling with the 2010-03-21 13:18:08 +00:00
stdio When reopening a stream backed by an open file descriptor, do not close 2010-12-09 20:28:30 +00:00
stdlib Revert to r214147, errno is not clobbered as originally 2010-10-22 08:51:49 +00:00
stdtime strptime(3) confused July with June with the fr_FR locale. 2010-05-09 22:01:35 +00:00
string Powerpc is special here. powerpc and powerpc64 use different ABIs, so 2010-08-24 20:54:43 +00:00
sys This commit implements the SO_USER_COOKIE socket option, which lets 2010-11-12 13:02:26 +00:00
uuid mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
xdr Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
yp Eliminate more dead stores. 2009-11-25 04:45:45 +00:00
Makefile To support stack unwinding for cancellation points, add -fexceptions flag 2010-09-25 01:57:47 +00:00
Versions.def Bump our namespace version for 9.0. 2009-09-13 13:15:36 +00:00