Re: [PATCH] Introduce O_CLOEXEC (take >2)
- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 31 May 2007 12:59:16 -0700 (PDT)
On Thu, 31 May 2007, Davide Libenzi wrote:
What I meant, was that the vast majority of MT+exec apps wants all their
fds (but an handfull, maybe) to be O_CLOEXEC. So a global,
non-inheritable, per-process flag seemed the most straightforward
solution.
I'm with Uli on this one. "Stateful" stuff is bad. It's essentially
impossible to handle with libraries - either the library would have to
explciitly always turn the state the way _it_ needs it, or the library
will do the wrogn thing.
For example, what about libraries that are used to set up stdin/stdout for
the forker?
This is not unlike floating point rounding. Having stateful rounding (like
the i387) is *stupid*. You want per-operation rounding (where *one* of the
choices may be "use default"). Exactly because libraries etc will need to
control their _own_ internal choices.
Linus
-
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/
- References:
- [PATCH] Introduce O_CLOEXEC (take >2)
- From: Ulrich Drepper
- Re: [PATCH] Introduce O_CLOEXEC (take >2)
- From: Davide Libenzi
- Re: [PATCH] Introduce O_CLOEXEC (take >2)
- From: Ulrich Drepper
- Re: [PATCH] Introduce O_CLOEXEC (take >2)
- From: Davide Libenzi
- Re: [PATCH] Introduce O_CLOEXEC (take >2)
- From: Jakub Jelinek
- Re: [PATCH] Introduce O_CLOEXEC (take >2)
- From: Davide Libenzi
- [PATCH] Introduce O_CLOEXEC (take >2)
- Prev by Date: Re: kexec and aacraid broken
- Next by Date: Re: [PATCH] add a trivial patch style checker II
- Previous by thread: Re: [PATCH] Introduce O_CLOEXEC (take >2)
- Next by thread: [PATCH 2/3] syslet demos - AIO file reading
- Index(es):