Modify

Opened 9 years ago

Closed 8 years ago

#4588 closed defect (wontfix)

readdir and readdir_r don't rewind properly

Reported by: pete@… Owned by: developers
Priority: normal Milestone:
Component: base system Version:
Keywords: Cc:

Description

after traversing a directory using readdir or readdir_r, rewind resets the directory structure (telldir seems to indicate such) but all subsequent calls to readdir and readdir_r return empty.

Sample output from kamikaze rc2 on a linksys wrt54gl:

first pass:
1 .
2 ..
3 dir
4 check
7 dir_r
16 nfqnl_test
17 ulog_http
19 webfilter
before rewind telldir(dir)=19
after rewind telldir(dir)=0
second pass:

on a working system, second pass looks just like first pass.

here is the same code running on ubuntu:

first pass:
452549683 dir_r.c
548661081 dir
646605981 tester
652735336 deny
687101409 allow
871337716 dir_r
1175137695 ..
1182178728 check.c
1227682848 .
before rewind telldir(dir)=2147483647
after rewind telldir(dir)=0
second pass:
452549683 dir_r.c
548661081 dir
646605981 tester
652735336 deny
687101409 allow
871337716 dir_r
1175137695 ..
1182178728 check.c
1227682848 .

Attachments (2)

dir_r.c (796 bytes) - added by anonymous 9 years ago.
dir.c (555 bytes) - added by anonymous 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by anonymous

Changed 9 years ago by anonymous

comment:1 Changed 9 years ago by pete@…

I notice the problem doesn't occur in /tmp which is a different file system type. The problem seems to happen within mini_fo.

comment:2 Changed 8 years ago by nbd

  • Resolution set to wontfix
  • Status changed from new to closed

yes, it's a known issue of mini_fo, which cannot be fixed properly there. this issue will go away automatically once we switch to union mounts, so i'll close this ticket.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.