File descriptor error in nftw (FTW_CHDIR)?

I am using a POSIX call nftw()to navigate the directory structure. The directory structure is flat - only 4 files and no subdirectories.

However, when I repeatedly call nftw () in this flat directory, I get an error after some time:

"too many open file handles".

It turned out that this happens when the flag is used FTW_CHDIR.

Do you agree that this is a bug in the Linux implementation of nftw ()?

UPDATE

The fix is ​​now available in the glibc repositories.

Here are some links to the source code I used for testing:

UPDATE

  • MacOS-X
  • Solaris9, Solaris10 AIX 5.3
+5
3

, - nftw linux.

, .

. glibc.

+6

Mac OS 10.6.2. , , - , , .

0

Mac OS: bugreport, Apple # 7640283. ( , .)

0

All Articles