This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4076] New: nftw "/" 0 FTW_CHDIR fails with "no such file or directory"


nftw to "/" with FTW_CHDIR fails with "no such file or directory"; see
the example below.

#define _GNU_SOURCE
#include <error.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <ftw.h>

static int fn(const char *file, const struct stat *sb, int flag, struct FTW *s)
{
        puts(file);
        return 0;
}

int main()
{
        if (nftw("/", fn, 0, FTW_CHDIR) < 0) {
                error(EXIT_FAILURE, errno, "nftw / FTW_CHDIR");
        }

        exit(EXIT_SUCCESS);
}

-- 
           Summary: nftw "/" 0 FTW_CHDIR fails with "no such file or
                    directory"
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=4076

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]