This is the mail archive of the
cygwin
mailing list for the Cygwin project.
scandirat return dirents of parent dir
- From: comic fans <comicfans44 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 4 Jul 2017 19:09:17 +0800
- Subject: scandirat return dirents of parent dir
- Authentication-results: sourceware.org; auth=none
Hello:
I've found this problem when compile
casync(https://github.com/systemd/casync.git) in cygwin,workflow to
trigger this :
rootfd=open(".",O_CLOEXEC|O_RDONLY|O_NOCTTY);
scandirat(rootfd,".", firstLevelDirEnts......);
foreach dirent in firstLevelDirEnts:
if dirent is dir:
subdirfd=openat(rootfd,
dirent->d_name,O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
scandirat(subdirfd,".", secondLevelDirEnts......);
at this time, secondLevelDirEnts should be files in subdir, but
in cygwin, secondLevelDirEnts is just same as firstLevelDirEnts.
This problem didn't happen in linux , nor win10 WSL, but
happens in both cygwin/msys2.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple