Re: For the almost 4-year anniversary: O_CLOEXEC again

From: Davide Libenzi (davidel_at_xmailserver.org)
Date: 03/29/04

  • Next message: Lucas de Souza Santos: "Isa/i2c [bug report]"
    Date:	Sun, 28 Mar 2004 19:14:31 -0800 (PST)
    To: Ulrich Drepper <drepper@redhat.com>
    
    

    On Sun, 28 Mar 2004, Ulrich Drepper wrote:

    > The proposed solution is simple and already implemented on some systems
    > (QNX, BeOS, maybe more). Beside the definition of O_CLOEXEC the
    > untested patch below should be all that's needed.

    What does prevent a fork() to hit you right before set_close_on_exec()?
    Shouldn't we have an install-and-set?

    (Personally I manually handle the fork child's code in my MT apps, when
    I'm going to exec untrusted apps. Manually here mean close all open fds > 2)

    - Davide

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Lucas de Souza Santos: "Isa/i2c [bug report]"

    Relevant Pages

    • Re: mremap() bug IMHO not in 2.2
      ... > Just guessing, but would a zero-length vma be rounded up to a page, and ... vma's (fork() and exit()) simply knows that a vma can never be ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [Lse-tech] [patch] sched-domain cleanups, sched-2.6.5-rc2-mm2-A3
      ... > multithreaded OpenMP STREAM running its childs first on the same node ... i believe the fix we want is to pre-balance the context at fork() time. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: deferred rss update instead of sloppy rss
      ... Linus Torvalds wrote: ... >>The problem is then that the proc filesystem must do an extensive scan ... Then, at fork, you just finish the forkwith ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: reiser4 vs politics: linux misses out again
      ... >> In reality, the implied attitude behind your statement actually ... > In fact such a fork would be a great thing. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: process creation time increases linearly with shmem
      ... some apps may not want hugetlb pages to be all ... That's why I was alluding towards having the user specify MAP_SHARED| ... MAP_LAZY or something to that tune and then have fork() honor it. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)