git: libc/fts: Use O_CLOEXEC for internal file descriptors
John Marino
marino at crater.dragonflybsd.org
Thu Nov 15 15:08:12 PST 2012
commit fc8c7a91ff2e30d25ba17d9469e9f0ac19adba26
Author: John Marino <draco at marino.st>
Date: Thu Nov 15 22:46:29 2012 +0100
libc/fts: Use O_CLOEXEC for internal file descriptors
Because fts keeps internal file descriptors open across calls, making such
descriptors close-on-exec helps not only multi-threaded applications but
also single-threaded applications.
In particular, this prevents passing a temporary file descriptor for saving
the current directory to processes created via find -exec.
Taken-from: FreeBSD SVN 241010 (27 SEP 2012)
Summary of changes:
lib/libc/gen/fts.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fc8c7a91ff2e30d25ba17d9469e9f0ac19adba26
--
DragonFly BSD source repository
More information about the Commits
mailing list