Re: Please revert git commit 1ad3dcc0
From: Bernd Schmidt
Date: Tue May 16 2006 - 11:10:13 EST
Linus Torvalds wrote:
Side note: this would be a valid argument, except it's not always true.
I'm not sure why Luke wanted the fd in the first place, though, and
whether we want it.
The only reason was a failed LTP testcase which fills up the FD table
and then called exec.
Some loaders may actually want the fd value, see for example themisc
loader and MISC_FMT_OPEN_BINARY, and the ELF loader _does_ actually do it
for the (interpreter_type == INTERPRETER_AOUT) case.
The flat loader does not need a FD value.
Before the change, we didn't allocate or install a file descriptor, hence
there wasn't any reason to return EMFILE. The spec at
http://www.opengroup.org/onlinepubs/009695399/functions/exec.html
doesn't list EMFILE as a possible error.
Totally irrelevant.
I think it is relevant: if the spec does not require it, and the flat
loader does not need the FD, then there is no reason to return EMFILE.
Both conditions are true in this case. If the spec did require it, then
that would be an argument that the LTP testcase is valid, and for
keeping the original patch.
Bernd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/