[haiku-bugs] [Haiku] #12755: rewinddir() doesn't work properly with readdir_r

  • From: "saprykin" <trac@xxxxxxxxxxxx>
  • Date: Fri, 06 May 2016 23:08:57 -0000

#12755: rewinddir() doesn't work properly with readdir_r
----------------------------------------+------------------------------
 Reporter:  saprykin                    |        Owner:  nobody
     Type:  bug                         |       Status:  new
 Priority:  normal                      |    Milestone:  Unscheduled
Component:  System/POSIX                |      Version:  R1/Development
 Keywords:  rewinddir readdir_r dirent  |   Blocked By:
 Blocking:                              |  Has a Patch:  0
 Platform:  All                         |
----------------------------------------+------------------------------
 I have noticed a wrong behavior of rewinddir():
 - open a directory with opendir() and read to the end using readdir_r();
 - call rewinddir();
 - try to read the next entry with readdir_r().

 I was expecting to get the first directory entry, instead of that I'm
 getting NULL which means the end of a directory stream.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12755>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: