bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "*** INTERNAL: readdir: Invalid argument" error


From: Paul Smith
Subject: Re: "*** INTERNAL: readdir: Invalid argument" error
Date: Wed, 15 May 2013 07:18:31 -0400

On Wed, 2013-05-15 at 12:29 +0300, Eli Zaretskii wrote:
> Question: Why do we force a fatal error when 'readdir' fails in that
> way?  Would it be better to display a warning, perhaps even under some
> debug command-line option, and otherwise simply treat that as the end
> of the directory stream?

Looking at the history of the file, I made this change in 2006.  Prior
to that, readdir() was not checked for error returns; we simply broke
out of the loop (if (d == 0) break;).

There's no indication in the changelog as to _why_ this change was made.
Probably it seemed like a good thing to do, to show some sort of message
if readdir() failed and, in POSIX anyway, there's really no "nice" error
you can get back from readdir().

I guess the idea is that if make is trying to find a target or
prerequisite file during a build and readdir() stops working, that is a
pretty serious error.

However I have no problem making this something non-fatal.  I think it
would be better to keep some kind of message, since otherwise it may be
very confusing to users as to why make is silently ignoring some files.
Obviously the current message is not appropriate.  Something that
mentions the filename at least, and maybe the directory (on Windows; on
other systems we don't have that information available)?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]