delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/07/04/09:27:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=DRL7mcbeXRiFq4rhB9muaaWmf7LEid7k/BM+0usZ6dDXhpK41cbjM
ELSC9seWTjKVU6CKuLDRITYwCThtADxLcOs1kdLaTWkwEW+Yn/rG0v9qWYIIZl87
UgeQx/fnQ/+4eP6jwDhBMWpGUhUu9A/IfM90fDMQaQIODD8c6ZSH+Q=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=1b4JCOz2gXpRgBjv2x45glneey0=; b=SNZbfIohiP/LBz3rwj5XoKg09w9a
YjpAdZoOO4/vHoEkW1pPmy4QVHaRzVEe0rYU07cWjnHug3yIlv0llc4dRCp2CSPM
04GQd0Cu4eKj8OXXrwAym83dc+Eb2jE9C92NZ+jUBfeMSl8svaG/lZZgl7USGBw9
O2zUttC5v5vjKTc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-101.9 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=fans, comic, Hx-languages-length:1138, wsl
X-HELO: drew.franken.de
Date: Tue, 4 Jul 2017 15:26:52 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: scandirat return dirents of parent dir
Message-ID: <20170704132652.GA7642@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAKzW8omBpxg5vAnaj7Xv5Q0wRjzmGQwEQ07wugxkGC-wNV9hBQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAKzW8omBpxg5vAnaj7Xv5Q0wRjzmGQwEQ07wugxkGC-wNV9hBQ@mail.gmail.com>
User-Agent: Mutt/1.8.0 (2017-02-23)

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Jul  4 19:09, comic fans wrote:
> Hello:
>      I've found this problem when compile
> casync(https://github.com/systemd/casync.git) in cygwin,workflow to
> trigger this :
>     rootfd=3Dopen(".",O_CLOEXEC|O_RDONLY|O_NOCTTY);
>     scandirat(rootfd,".", firstLevelDirEnts......);
>     foreach dirent in firstLevelDirEnts:
>          if dirent is dir:
>              subdirfd=3Dopenat(rootfd,
>                   dirent->d_name,O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
>              scandirat(subdirfd,".",  secondLevelDirEnts......);
>=20
>      at this time, secondLevelDirEnts should be files in subdir, but
> in cygwin, secondLevelDirEnts is just same as firstLevelDirEnts.
>=20
>       This problem didn't happen in linux , nor win10 WSL,  but
> happens in both cygwin/msys2.

First I thought you stumbled over the problem that the first two entries
returned by scandirat are "." and "..", but on closer investigation I
saw the problem.

I pushed a fix to the git repo and uploaded new developer snapshots
to https://cygwin.com/snapshots/  Please try.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--sm4nu43k4a2Rpi4c
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZW5ecAAoJEPU2Bp2uRE+gQcAQAKVMet3bsXhPW2VeN8LPkd/r
uRUfv2C4DKhy4My1iMXyd+3RCrGMwmkaA2bYPgl1MAD2dr9ZAlsz7GIybXqmlU6h
XF0HxJWOU/HzYsNIu6Lu998n18UxhBMsal2FfWEM1JeD1ShrAPK9eLNuG+6NIM3T
cDDi6iRkT3J8L6dydQY2SVnSMqn4lnnI3sdzhQN0Z0nvwYoLyivDELZ9PP7zjZvF
kDxlu5XnQ+19vUNe82mYNuD/aUe1B7wqXozOuIFcsB5xtcl6GHmx6xJVPjXyf2yR
4ND0HiCCqtuu6WjoJu7KgcqyDVW7xUP9IQksOvA1rnlkGoQhm2WkMz3OgoT+AHfF
NS6MHKfc+vWN3tUtyUjCTp5XGGkhgWixN/vAlI7oCQFLi0zvi8wso9Tot6WLgili
29FDn6RKWQ55oC8eCdCkfMTm2pSeTo5Wu7d1G26en6qVrOMB/hc9G1Grsc6CDzYz
6PDC7AfulqPFD2N5fGjfmqkhfzx4Qf3eGlGjqDeics2Ix1FdWWeSoQSSuvL4oNGx
ecW7YuBwU7lZvqu9K2IeCmVmg+fKYk1aPVsG2eUwit5QP0lD++k0S7BV4PWjesM6
KZKAKE9lWkT30wQSQsdJ8cTxgX5IqvLAOI7gTgDi0WFFa6AHSZ+QUyM19zC8uyx6
Lb2P6jle5J5FgFqUMhQU
=zj9j
-----END PGP SIGNATURE-----

--sm4nu43k4a2Rpi4c--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019