Sun 15 Sep 2013 08:42:55 PM UTC, comment #3:
We can't stop immediately on any type of error, because we have to allow the user to provide a rule that can resolve the problem if the error is recoverable. That includes not just things like missing files but also permissions errors, etc.
I added a check only for unrecoverable errors, and failed immediately.
|
Wed 02 Sep 2009 08:31:44 PM UTC, comment #2:
Oops. I get the same message; I hadn't noticed that it scrolled off the top of my terminal.
Nonetheless, I still think make should drop dead immediately in this case and also return an error status. My understanding is that 'include' may sometimes (always?) ignored a missing included file, but I don't think that this condition sensibly falls under that mandate.
(I'm tempted to say that make should specifically disallow a file from including itself (even indirectly). Perhaps there is some use for this, though.)
|
Wed 02 Sep 2009 08:08:17 PM UTC, comment #1:
I see the error message:
martind@whitewater:~/playpen/make-27374$ make -f make.bug > /dev/null && echo success
make.bug:1: make.bug: Too many open files
success
martind@whitewater:~/playpen/make-27374$
The failure happens (for me) here in the strace:
read(1023, "include make.bug\n\necho ::\n\t@echo"..., 4096) = 41
open("make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/include/make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/local/include/make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/include/make.bug", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/locale.alias", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 EMFILE (Too many open files)
write(2, "make.bug:1: ", 12make.bug:1: ) = 12
write(2, "make.bug: Too many open files", 29make.bug: Too many open files) = 29
write(2, "\n", 1
|
Wed 02 Sep 2009 07:26:22 PM UTC, original submission:
While including a makefile, if a fatal error (e.g., no more filehandles available) is generated, make does not give any error or warning, even if the include is not preceded by a '-'.
This can be reproduced like so, assuming that the top-level makefile is named 'make.bug':
include make.bug
echo ::
@echo echoing
This will recurse until the filehandle limit is hit, then complete with no diagnostics nor error status.
I think that an error like exceeding the filehandle limit should always draw an immediate fatal error, as this is not the kind of error that should ever be ignored.
|