This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: opendir(/dev/fd/n) should fail
- From: Helmut Karlowski <helmut dot karlowski at ish dot de>
- To: cygwin at cygwin dot com
- Cc: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- Date: Fri, 23 Jan 2015 10:54:30 +0100
- Subject: Re: opendir(/dev/fd/n) should fail
- Authentication-results: sourceware.org; auth=none
- References: <op dot xsv0ekzkofd6j1 at nebbiolo dot upc dot de> <20150123094322 dot GA5612 at calimero dot vinschen dot de>
--------------------------------------------------
Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
(23/01/2015 10:43)
> > 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.
It's not just bash. The same happens in my home-grown shell. Starting
with /dev/fd/3 opendir succeeds giving (only the opendir-entries):
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/0/',prefix_len=12,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/1/',prefix_len=12,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/2/',prefix_len=12,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/',prefix_len=12,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/0/',prefix_len=14,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/1/',prefix_len=14,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/2/',prefix_len=14,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/',prefix_len=14,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/0/',prefix_len=16,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/1/',prefix_len=16,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/2/',prefix_len=16,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/',prefix_len=16,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/0/',prefix_len=18,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/1/',prefix_len=18,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/2/',prefix_len=18,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/',prefix_len=18,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/0/',prefix_len=20,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/1/',prefix_len=20,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/2/',prefix_len=20,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/',prefix_len=20,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/0/',prefix_len=22,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/1/',prefix_len=22,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/2/',prefix_len=22,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/',prefix_len=22,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/0/',prefix_len=24,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/1/',prefix_len=24,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/2/',prefix_len=24,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/',prefix_len=24,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/0/',prefix_len=26,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/1/',prefix_len=26,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/2/',prefix_len=26,hasdot=0,fignore=484444:''
[ 752:3]
globit:ksh_opendir:'/dev/fd/3/3/3/3/3/3/3/3/3/',prefix_len=26,hasdot=0,fignore=484444:
...
Linux seems to have has a similar bug.
-Helmut
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple