delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/01/08/11:31: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=orZQ0jP8Dh5BV2k6F7IPESAvNEYFHucwrLE4oGRfAiwv2ZH2AbXmF
F6Tr4ymevRMKHnf/IDKcB9qFQYEwW82dbvl5lPt8UI2np+ggebpVEb8aJXRChLYM
C2NkIJHwdc17K/5gHOmF6t3irSkS2JPXfIwQ+xNUZICxbZ8zhdfFrQ=
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=zQuotuDpIXBqOQR5fpZmpQ3MFXA=; b=vKGVlRPJCSvPGuk/W1w4yERKtu0B
JUpwYwBEpRHpxqqkIzgSysKmG5c3l4tMg2IXDG7woJ2F3Ol4PppjD0TOcTbviY/X
2bs806AzJgcZBKaPnzTHRjaXnNoCp7ZF4jDnKK6iakgcptgR8Mc3595awpVPjAUS
ZUo1lXhvjj9JghY=
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_50,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=Maintainer, DOT, H*i:sk:8323510, H*f:sk:8323510
X-HELO: calimero.vinschen.de
Date: Fri, 8 Jan 2016 17:30:55 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Pipes Again -- a simple test case
Message-ID: <20160108163055.GK20447@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <0aebd09993901f3ef3ff728d162952cd AT xs4all DOT nl> <568A32BE DOT 4080101 AT gmail DOT com> <c7ebcc77c3ee94c4a81c48ebbdc81de9 AT xs4all DOT nl> <20160108151933 DOT GI20447 AT calimero DOT vinschen DOT de> <83235106e7ed2fcfde26293d156be51d AT xs4all DOT nl>
MIME-Version: 1.0
In-Reply-To: <83235106e7ed2fcfde26293d156be51d@xs4all.nl>
User-Agent: Mutt/1.5.24 (2015-08-30)

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

On Jan  8 17:12, Houder wrote:
> On 2016-01-08 16:19, Corinna Vinschen wrote:
> >On Jan  4 10:24, Houder wrote:
> >>On 2016-01-04 09:52, Marco Atzeri wrote:
> >>>On 04/01/2016 09:03, Houder wrote:
> >>>>Hi Corinna,
> >>>>
> >>>>I have been looking for an STC to show why cmp fails on Cygwin (and to
> >>>>show the
> >>>>difference between Cygwin and Linux).
> >>>>
> >>>>The STC below creates a pipe (pipe() is used), followed by calls to
> >>>>fstat() and
> >>>>stat() for both the read end and the write end of the pipe.
> >>>>
> >>>>(I also tested with popen()/pclose(): same result)
> >>>>
> >>>>Regards,
> >>>>Henri
> >
> >Thanks for the STC.  However, given how this stuff works internally,
> >I have no good solution off the top of my head.  I played with various
> >ideas but to no avail.  I add this to my TODO list, but I probably
> >won't have a quick solution :(
> >
> >
> >Thanks,
> >Corinna
> >
> >
> >P.S: It would be really helpful if you could stick to the original
> >     thread and simply use "reply-to" once a discussion has started.
> >     It's very confusing having to connect the various threads.  Thanks.
>=20
> Perhaps David B. can be helped by a Cygwin-specific patching to "cmp"? Er=
ic?
>=20
> ... replacing the call to fstat() by a call to stat() ...
> (as shown in https://cygwin.com/ml/cygwin/2015-12/msg00348.html)
>=20
> By the way, thank you for reporting back to "us" about this. I already
> feared that a "general" solution would have to wait ... You have already
> too much on your plate.
>=20
> As a final point, I also tested FIFOs and (unix domain) sockets.
>=20
> FIFOs pass the test, sockets do not.

Yes, that's expected.  The underlying hack^Wmethod is the same for sockets
and pipes, while FIFOs have a real path on a real filesystem and thus have
a real inode number to fetch in stat/fstat.


Corinna

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

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

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

iQIcBAEBCAAGBQJWj+Q/AAoJEPU2Bp2uRE+gAloP/3JwA3UeZCKOxdvxokETwFTT
SAoLX+bv25FBmUDbfmMho+imHlNHOmtvLi0xphYfBz10IEJZ2ttU5fugQopPKr55
E3tokE8eLN4Ez3Lh3JNyWc+7HRjQ3Fkpb3k5qxppCZ/NKHS3z220O5oVTOupu+U/
akhnNkykQtzPSzZv5Ro/8FXlz2jSxQvXXJ7jkHsvhLixv1fkOv1aai5wR7ZeRQDi
LmKn7wtRWmjpy0yi1quPugXBPg6g2EBBcS9qmFlsBpjl8zT1lyi530nOqmO5rzH5
Zy5eXH7IpkjItvBZS6onL22zi8FGHomqk6Jq1X8AAkgbVSMFL4XfBJ1PrnC6Opye
JSMi3g6ed4NOzfQkbrtqJ+9KQFe5ry6bEP7PQa1mEM+70/EoJf3JGEypHDByIf63
2UnzZfFizW76BMIbj8+PmcsQdrWGkaetKmZxmsWOdvJRxx4+4jyAUZ9TajsT/5gh
sTTfRV4WF9OpuADdUr65w9eqsh4zhxGZNuBGehU7N0U9xs7pmZm8D+B+LTfgXfqY
Gyys08EdoYFyUY2C8pFcqOAbTJxZDuOkkTDzf8bl2WC+Gch/jMKeLBz8DCYjlI/4
xdWYJDdvF+pALnBUOrFGkkM+nbVuXwY52spIvCGpXKLcr63uo89WMsXgiULZfePa
B4IPSyuoUDpz2FTD0wln
=8+Nt
-----END PGP SIGNATURE-----

--W2ydbIOJmkm74tJ2--

- Raw text -


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