bug-coreutils
[Top][All Lists]
Advanced

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

fts changes


From: Jim Meyering
Subject: fts changes
Date: Mon, 15 May 2006 15:29:38 +0200

FYI, I've just done this, as suggested a couple months ago:

2006-05-13  Jim Meyering  <address@hidden>

        * xfts.c (xfts_open): Always use FTS_CWDFD.

        Restore the parts of fts that were removed on 2006-01-17, so that
        it's easier for legacy applications designed for the version
        of fts in glibc or BSD to convert to this more robust version.
        Add a new mode, FTS_CWDFD, by which to enable the improved
        (openat- based -- aka no-chdir) semantics.
        * fts_.h (FTS_CWDFD): Define.  Callers must use this fts_open
        option to enable the more robust behavior.
        (FTS_OPTIONMASK): Widen accordingly.
        * fts.c: Restore removed code, reverting the default behavior.

I've also made a small performance improvement:

2006-05-15  Jim Meyering  <address@hidden>

        Avoid the expense of an fstat, when possible.
        * fts.c (O_NOFOLLOW, STREQ): Define.
        (diropen_fd): Remove function.  Merge it into sole caller...
        (diropen): ...here.  Use O_NOFOLLOW when appropriate.
        (fts_safe_changedir): Call fstat for dev/inode check, only if the
        previous open/openat call may have opened the wrong directory.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]