From: newsham AT aloha DOT net (Tim Newsham) Subject: Re: bug in find 24 Jan 1997 00:01:35 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199701232314.NAA02326.cygnus.gnu-win32@haleakala.aloha.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: newsham AT aloha DOT net (Tim Newsham) Original-Cc: gnu-win32 AT cygnus DOT com In-Reply-To: <199701221904.JAA16957@haleakala.aloha.net> from "Tim Newsham" at Jan 22, 97 09:04:22 am X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*] Original-Sender: owner-gnu-win32 AT cygnus DOT com > uname -a: > CYGWIN32/NT OMEGA 4.0 17.3 i686 > > It looks like find has a bug. Consider the following: > > windows$ find -name '*.c' >& out; cat out > find: ./out: Permission denied > > The find command has trouble with open files it seems. I've narrowed the problem down some more. It seems that lstat() cannot stat an open file. Test case: #include #include main() { int res; struct stat buf; res = lstat("./file", &buf); if(res == -1) perror("stat"); printf("done\n"); } % gcc test.c % a.out done % a.out >& file % cat file stat: Permission denied done - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".