/dev/fd/N not synonymous with file descriptor N; it is on Linux

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Jan 22 10:39:00 GMT 2019


On Jan 22 11:20, Houder wrote:
> On Tue, 22 Jan 2019 10:41:57, Corinna Vinschen  wrote:
> > On Jan 22 10:25, Houder wrote:
> [snip]
> 
> > > Curious! It fails (for me) on W7 ...
> > 
> > It works for me just as well on W7:
> > 
> > $ uname -a
> > CYGWIN_NT-6.1 vmbert764 2.12.0(0.333/5/3) 2019-01-21 22:47 x86_64 Cygwin
> > $ ./stca /dev/fd/0 <<EOF
> > ? bla
> > ? EOF
> > fd1 =3D 0
> > argv[1] =3D /dev/fd/0
> > fd2 =3D 3
> > buf =3D \
> > Hello, world!
> 
> That is odd ... (I am using the same version of Cygwin as you do, do I
> not?)
> 
> 64-@@ uname -a
> CYGWIN_NT-6.1 Seven 2.12.0s(0.333/5/3) 2019-01-21 10:25 x86_64 Cygwin
> (however, I only replaced the cygwin1.dll)

Yes

> (the snapshot is apparently not the same as your version 2.12.0)

My version only differs by the fact that it's built without optimization
and with broken posix timer code since I'm revamping it ATM.

Maybe you should run the above shell session under strace and see if
something unusual crops up.  BLODA?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190122/5ac08088/attachment.sig>


More information about the Cygwin mailing list