This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4076] New: nftw "/" 0 FTW_CHDIR fails with "no such file or directory"
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 19 Feb 2007 16:20:38 -0000
- Subject: [Bug libc/4076] New: nftw "/" 0 FTW_CHDIR fails with "no such file or directory"
- Reply-to: sourceware-bugzilla at sourceware dot org
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.