Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 8 May 2002 15:38:54 -0400 (EDT) From: Mark Blackburn To: cygwin AT cygwin DOT com Subject: EISDIR EACCES and open in grep Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I was trying to track down a problem I was having with grep not recursing subdirectories and this appears to be the problem: from grep.c in grep-2.5-1: in the function grepfile (char const *file, struct stats *stats) at line 911: while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR) continue; if (desc < 0) { int e = errno; if (is_EISDIR (e, file) && directories == RECURSE_DIRECTORIES) { if (stat (file, &stats->stat) != 0) { error (0, errno, "%s", file); return 1; } return grepdir (file, stats); } the call to open is leaving a 13 (EACCESS) instead of 21 (EISDIR) in errno so the call to grepdir doesn't happen. Platform is Windows 98, cygwin1.dll is version:1.3.10 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/