summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorcsjp <csjp@FreeBSD.org>2006-03-20 00:13:47 +0000
committercsjp <csjp@FreeBSD.org>2006-03-20 00:13:47 +0000
commit7448676f59fe1294f9b5ec654564614a5c1edbe1 (patch)
tree877b09126e8496290f551828dbc6587427b278db /lib/libc/stdlib
parent9d0a01c72c9e90544ae40c954d2d9e7529e09043 (diff)
downloadFreeBSD-src-7448676f59fe1294f9b5ec654564614a5c1edbe1.zip
FreeBSD-src-7448676f59fe1294f9b5ec654564614a5c1edbe1.tar.gz
Restore fd optimization with a few minor tweaks, to quote tegge:
"fdinit() fails to initialize newfdp->fd_fd.fd_lastfile to -1. This breaks fdcopy() which will incorrectly set newfdp->fd_freefile to 1 if no files are open and the last file descriptor marked as unused for fdp was 0. This later causes descriptor 0 to be unavailable in newfdp when the optimization is enabled. When the last file descriptor previously marked as used is nonzero and marked as unused, fdunused() incorrectly sets fdp->fd_lastfile to fd - 1 due to fd_last_used() returning (size - 1). This hides the problem that breaks the optimization." This allows us to keep the optimization, while un-breaking it. This is a RELENG_6 candidate. PR: kern/87208 MFC after: 1 week Submitted by: tegge
Diffstat (limited to 'lib/libc/stdlib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud