DragonFly BSD
DragonFly commits List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: libc/fts: Use O_CLOEXEC for internal file descriptors


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Nov 2012 15:08:12 -0800 (PST)

commit fc8c7a91ff2e30d25ba17d9469e9f0ac19adba26
Author: John Marino <draco@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]