Red Hat Bugzilla – Bug 51132
telldir(), seekdir(), telldir() does not result in same location
Last modified: 2016-11-24 09:53:02 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.74 [en] (X11; U; SunOS 5.7 sun4u)
Description of problem:
Something is fishy in seekdir() and/or telldir().
A regression test we use for testing our own file system works great on
every other UNIX we've tried it on, but on Linux it gets failures
due to something in how seekdir() and telldir() manage their directory
offset values. A telldir() followed by a seekdir() to that location and
telldir() does not yield the same directory offset value.
Steps to Reproduce:
1. compile the attached program
2. run it like so: "seekdir <dirname>" (no pathname separators in the
Actual Results: It complains about fishy results.
Expected Results: Nothing should be printed.
Created attachment 26693 [details]
source code of seekdir/telldir test
Should be fixed by http://sources.redhat.com/ml/libc-hacker/2001-08/msg00025.html
Should be fixed in glibc-2.2.4-5.