Re: [PATCH] Introduce O_CLOEXEC (take >2)



On Thu, May 31, 2007 at 11:46:31AM -0700, Davide Libenzi wrote:
On Thu, 31 May 2007, Ulrich Drepper wrote:
Davide Libenzi wrote:
Isn't this better be a global process flag? Default should be, for legacy
reasons,

No. Policies are always wrong since it means code that cannot change
the policy (e.g, all runtime libraries) have no access to the
functionality. I cannot set the policy to default to close-on-exit in
glibc all the while the application assumes this is not the case.

I was talking for a broader usage, not only glibc centric. Most ppl
writing MT+exec apps wants all but (eventually) and handfull of files
leaking across the exec boundary.

If open (and all other syscalls that create fds) have O_CLOEXEC (and
something similar for other syscalls), then such a policy can be easily
implemented on the userland, if desired.

Jakub
-
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/



Relevant Pages

  • Re: [PATCH] Introduce O_CLOEXEC (take >2)
    ... the policy have no access to the ... If open (and all other syscalls that create fds) have O_CLOEXEC (and ... apps wants all their fds (but an handfull, ...
    (Linux-Kernel)
  • Re: Happy christmas
    ... functionality or efficiency. ... This is opposite to the philosophy of the C++ Committee. ... It's not a good policy. ... But if you are reading standard, workaday code, that is maybe manipulating a user report in a protein program, its a big help if the calls are familiar with you. ...
    (comp.lang.c)
  • Re: Security Policy Is not opening.
    ... Actually we dint find that policy in the Domain Controllers ... Sysvol version: 00 ... User extensions: not found ... Functionality version: 2 ...
    (microsoft.public.win2000.security)
  • Re: parsing web pages
    ... Is there any similar functionality in javascript ... and port (Same Origin Policy). ...
    (comp.lang.javascript)
  • Re: Failed to open the Group Policy Object - Details: The system cannot find the path specified.
    ... Friendly name: Default Domain Policy ... Flags: 0 ... Functionality version: 2 ... Sysvol version: 600 ...
    (microsoft.public.win2000.group_policy)