From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25512 invoked by alias); 11 Jan 2016 11:55:26 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 25470 invoked by uid 89); 11 Jan 2016 11:55:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-101.6 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=filesystem, confusing, H*r:500, followed X-HELO: calimero.vinschen.de Received: from ipbcc05c50.dynamic.kabel-deutschland.de (HELO calimero.vinschen.de) (188.192.92.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Jan 2016 11:55:25 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 280E6A8040B; Mon, 11 Jan 2016 12:55:23 +0100 (CET) Date: Mon, 11 Jan 2016 15:40:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Pipes Again -- a simple test case Message-ID: <20160111115523.GD32610@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <0aebd09993901f3ef3ff728d162952cd@xs4all.nl> <568A32BE.4080101@gmail.com> <20160108151933.GI20447@calimero.vinschen.de> <83235106e7ed2fcfde26293d156be51d@xs4all.nl> <20160108163055.GK20447@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FFoLq8A0u+X9iRU8" Content-Disposition: inline In-Reply-To: <20160108163055.GK20447@calimero.vinschen.de> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-01/txt/msg00110.txt.bz2 --FFoLq8A0u+X9iRU8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2274 On Jan 8 17:30, Corinna Vinschen wrote: > 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. Thank= s. > >=20 > > Perhaps David B. can be helped by a Cygwin-specific patching to "cmp"? = Eric? > >=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. >=20 > 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. I applied a patch to make this work. Please give the latest developer snapshot from https://cygwin.com/snapshots/ a try. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --FFoLq8A0u+X9iRU8 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWk5gqAAoJEPU2Bp2uRE+gwIIP/3Arm0Q1VYALulkq+6Yaa3XO 3X4ru4bG+KChplju3XiDKmL+qkcKWFhLuYUj08/KIrnGpNmY7R8CLtiJR4njCGWb WrW5ultBxzn+uslq8CldLqt+zfzG6o2d0IaQ5Q7g1hXL93a0UGc7SxZlRMxxArnN ooV+4fqJiaG1/cMRXpl/1aCp7CR7qPmrL3Rn91rqSZ9xEUdmjwuuA+a6IVk2laS1 qEfVEhCtgbpGKNfhlyzsz1VUkUy0zuXixy0b2sT69mAFbO53ChHmUsxWelkaenGp HTHoc7KxodXq+Shc1olNXdzrLJAQQYSAuN0yc9Tyk8+yHLGccoIx9ZByJz2Gn/Zu yd9eecsdL/R7h8FjYcCLYHEfZ7Mh1Iw18SIsBN/GPPpDqPt3AUjnXpISDy8SaKls GfPAc/bpCreDqGut/9gXjDJYVSmpDsukfjbbFtf3mBxOLwEyiefF2fDGVZJg/Ir1 V342s9bakUBdzItksyCGeNjnotyTK+xGv0ZQ/PbNmKGsIenXjj7oI11cuUc0uIn4 /YEDASMhln6F9FvhJGATH1PrEQ6AhVAasPyYO3uPWQkQbcysG6qCeUCI70OEvlvW H+I2Rnw6PH9Bxrs1aSBGuCCcgV4Urmtsdflh0IlIDOGqxsEOP2ei1zB73P0i1SgX cOrb9p0PMQOZjM8OIE5U =stWG -----END PGP SIGNATURE----- --FFoLq8A0u+X9iRU8--