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
5f48d8fc26
commit
0708297e43
@ -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…
Reference in New Issue
Block a user