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: opendir(/dev/fd/n) should fail


On Jan 22 23:19, Helmut Karlowski wrote:
> Am 22.01.2015, 22:47 Uhr, schrieb Helmut Karlowski:
> 
> >#! /bin/bash
> >(set -o globstar 2>/dev/null) && set -o globstar || shopt -s globstar
> >extglob
> >echo /dev/fd/**
> 
> run this in on mintty, and then in another:
> ps:
> ...
>       816    4012     816        176  pty0    1004 00:15:27 /usr/bin/obash
> 676/home/hk#ll /proc/816/fd
> total 0
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 0 -> /dev/pty0
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 1 -> /dev/pty0
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 10 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 100 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 101 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 102 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 103 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 104 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 105 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 106 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 107 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 108 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 109 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 11 -> /proc/816/fd/
> lrwxrwxrwx 1 hk Benutzer 0 Jan 23 00:15 110 -> /proc/816/fd/
> 
> numerous entries ...

This occurs on Linux as well, just with a few less entries in
fd (42 rather than 560).  These descriptors are apparently
created by bash for some reason I don't know, and our bash seems
to create some more descriptors than the newler bash on Linux.

Eric, do you happen to know what bash  is doing here?


Thanks,
Corinna

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

Attachment: pgpOe3jeYcFwl.pgp
Description: PGP signature


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