delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/03/09:27:54

X-Spam-Check-By: sourceware.org
Message-ID: <43BA89E0.1020209@byu.net>
Date: Tue, 03 Jan 2006 07:27:44 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: Angelo Graziosi <Angelo DOT Graziosi AT roma1 DOT infn DOT it>
Subject: Re: Using (test) coreutils-5.93-2
References: <Pine DOT OSF DOT 4 DOT 21 DOT 0601031246090 DOT 13731-100000 AT ax0rm1 DOT roma1 DOT infn DOT it> <43BA8581 DOT 1090303 AT byu DOT net>
In-Reply-To: <43BA8581.1090303@byu.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 1/3/2006 7:09 AM:
> 
> I'll investigate; for what it's worth, I'm not even seeing the duplication
> in the (no longer available) 5.93-1, although the only thing that changed
> between -1 and -2 was recompilation to pick up brand new flags to open
> such as O_DIRECT.  Perhaps the ls code uses one of those flags when
> available, and the use of that flag is tickling a cygwin bug; I'll have
> more details once I finish my analysis.

Definitely a cygwin bug; probably related to the removal of d_ino changing
the d_version field of struct dirent from 1 to 2.  Reproducible test case:

$ uname -a
CYGWIN_NT-5.1 LOUNGE 1.5.19s(0.149/4/2) 20051224 14:32:37 i686 Cygwin
$ ./foo
.
..
file1
file2
foo.c
foo.exe
.
..
$ cat foo.c
$ cat ../foo.c
#include <stdio.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <libgen.h>
#include <dirent.h>

int
main (int argc, char* argv[])
{
  DIR* dir;
  struct dirent* dp;
  dir = opendir(".");
  if (! dir)
    exit(1);
  while ((dp = readdir(dir)) != NULL)
    printf("%s\n", dp->d_name);
  closedir(dir);
  return 0;
}

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDuong84KuGfSFAYARAopnAJ9jHWdQwy+4oMVzPxxQnINRWKz3KgCgiSkd
+4gI6qXCV1UyYPjGiIBM894=
=wmnp
-----END PGP SIGNATURE-----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019