opendir(/dev/fd/n) should fail
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Jan 22 16:41:00 GMT 2015
On Jan 22 10:18, Corinna Vinschen wrote:
> On Jan 21 22:55, Helmut Karlowski wrote:
> > I discovered a strange behaviour when accessing /dev/fd:
> >
> > ls -l /dev/fd/0
> > ls -l /dev/fd/0/1
> > ls -l /dev/fd/0/1/2/3/4/5
> > ls -l /dev/fd/0/1/2/3/
> > ls -l /dev/fd/0/1/2
> > ls -l /dev/fd/0/1/2/3
> > ls -l /dev/fd/0/1/1/1/1
> >
> > gives:
> >
> > lrwxrwxrwx 1 hk Benutzer 0 Jan 21 23:52 /dev/fd/0 -> /dev/pty0
> > lrwxrwxrwx 1 hk Benutzer 0 Jan 21 23:52 /dev/fd/0/1 -> /dev/pty0
> > ls: cannot access /dev/fd/0/1/2/3/4/5: Not a directory
> > ls: cannot access /dev/fd/0/1/2/3/: Not a directory
> > lrwxrwxrwx 1 hk Benutzer 0 Jan 21 23:52 /dev/fd/0/1/2 -> /dev/pty0
> > ls: cannot access /dev/fd/0/1/2/3: Not a directory
> > lrwxrwxrwx 1 hk Benutzer 0 Jan 21 23:52 /dev/fd/0/1/1/1/1 -> /dev/pty0
> >
> > I'd expect ls /dev/fd/n/p to fail for any combination of n and p.
> >
> > I'm using 1.7.32. Has this been fixed meanwhile?
>
> No, nobody reported it yet, afaics. I'll have a look later today.
I applied a fix and uploaded a new developer snapshot to
https://cygwin.com/snapshots/
Please give it a try and report back.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150122/e5e5f3f3/attachment.sig>
More information about the Cygwin
mailing list