Bug 10374 - spurious "error reading current directory" errors
Summary: spurious "error reading current directory" errors
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cvs
Version: 6.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-03-27 19:05 UTC by Jonathan Kamens
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-04-24 20:48:13 UTC
Embargoed:


Attachments (Terms of Use)
patch to initialize errno when necessary (2.02 KB, patch)
2000-03-27 19:09 UTC, Jonathan Kamens
no flags Details | Diff

Description Jonathan Kamens 2000-03-27 19:05:47 UTC
Because readdir returns NULL when all directory entries have been read OR
there was an error reading the directory, cvs sets errno to 0 before each
call to readdir and then checks if it is non-zero afterwards to determine
if an error occurred.

Unfortunately, there are a few places in which cvs forgets to set errno to
0 when it should have, and as a result, it can sometimes report spurious
"error reading current directory" errors.  Yes, I actually saw this happen
once, although I can't replicate it easily in a small sample tree, and the
patch I'm about to attach to this bug does in fact make the spurious errors
I saw go away.

Y'all should submit this back to the cvs maintainers as well as putting it
into the redhat package until they incorporate it into the master tree.

Comment 1 Jonathan Kamens 2000-03-27 19:09:59 UTC
Created attachment 162 [details]
patch to initialize errno when necessary

Comment 2 Jim Kingdon 2000-04-24 20:47:59 UTC
Some of these are already fixed in CVS 1.10.8, if memory serves.

Comment 3 Nalin Dahyabhai 2000-07-10 20:44:23 UTC
Slightly modified versions of these changes are being rolled into
cvs-1.10.8-7 and later.


Note You need to log in before you can comment on or make changes to this bug.