mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Bernd Schmidt <bernds_cb1@t-online.de>
Cc: Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	luke.yang@analog.com, gerg@snapgear.com
Subject: Re: Please revert git commit 1ad3dcc0
Date: Tue, 16 May 2006 07:54:11 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0605160740070.3866@g5.osdl.org> (raw)
In-Reply-To: <4469E1AF.7040908@t-online.de>



On Tue, 16 May 2006, Bernd Schmidt wrote:
> 
> It's not the get_file that's the problem, it's the get_unused_fd and
> fd_install.  These files are now open while the process lives and consume file
> descriptors. 

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.

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.

So it's certainly not a new concept, and other loaders do the exact same 
thing. 

Whether the flat loader should do it (or under what circumstances it 
should do it), I just can't make any judgement. More information needed.

> 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.

A lot of system calls will return errors other than the ones listed. The 
text says "shall fail if", which just means that those errors are 
_required_ to happen under the circumstances listed (and you can't use 
other errors _for_those_particular_circumstances_).

See

	http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_03.html#tag_02_03

  "Implementations may support additional errors not included in this 
   list, may generate errors included in this list under circumstances 
   other than those described here, or may contain extensions or 
   limitations that prevent some errors from occurring. The ERRORS section 
   on each reference page specifies whether an error shall be returned, or 
   whether it may be returned. Implementations shall not generate a 
   different error number from the ones described here for error 
   conditions described in this volume of IEEE Std 1003.1-2001, but may 
   generate additional errors unless explicitly disallowed for a 
   particular function."

for more.

		Linus

  parent reply	other threads:[~2006-05-16 14:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-16 11:23 Bernd Schmidt
2006-05-16 13:58 ` Andrew Morton
2006-05-16 14:29   ` Bernd Schmidt
2006-05-16 14:50     ` Andrew Morton
2006-05-16 14:57       ` Bernd Schmidt
2006-05-16 14:54     ` Linus Torvalds [this message]
2006-05-16 15:10       ` Bernd Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0605160740070.3866@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=akpm@osdl.org \
    --cc=bernds_cb1@t-online.de \
    --cc=gerg@snapgear.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke.yang@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®