POSIX says that passing a location returned by telldir() to seekdir()
after an intervening call to rewinddir() is undefined, so reclaim any pending telldir() cookies in the directory when rewinddir() is called. CR: D459 Reviewed by: jilles MFC after: 1 week
This commit is contained in:
parent
68a15d81de
commit
c6ab5d746c
@ -58,6 +58,7 @@ rewinddir(dirp)
|
||||
dirp->dd_seek = 0;
|
||||
}
|
||||
dirp->dd_loc = 0;
|
||||
_reclaim_telldir(dirp);
|
||||
if (__isthreaded)
|
||||
_pthread_mutex_unlock(&dirp->dd_lock);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user