This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Pipes Again -- a simple test case


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.  Thanks.
> > 
> > Perhaps David B. can be helped by a Cygwin-specific patching to "cmp"? Eric?
> > 
> > ... replacing the call to fstat() by a call to stat() ...
> > (as shown in https://cygwin.com/ml/cygwin/2015-12/msg00348.html)
> > 
> > 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.
> > 
> > As a final point, I also tested FIFOs and (unix domain) sockets.
> > 
> > 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.

I applied a patch to make this work.  Please give the latest developer
snapshot from https://cygwin.com/snapshots/ a try.


Thanks,
Corinna

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

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]