Thread (24 messages) 24 messages, 11 authors, 2022-06-28

Re: [PATCH v2] Implement close-on-fork

From: Matthew Wilcox <willy@infradead.org>
Date: 2020-05-15 16:26:37
Also in: linux-alpha, linux-arch, linux-fsdevel, lkml, sparclinux

On Fri, May 15, 2020 at 04:07:33PM +0000, Karstens, Nate wrote:
Matthew,

What alternative would you suggest?
quoted
From an earlier email:
quoted
...nothing else addresses the underlying issue: there is no way to
prevent a fork() from duplicating the resource. The close-on-exec
flag partially-addresses this by allowing the parent process to
mark a file descriptor as exclusive to itself, but there is still
a period of time the failure can occur because the auto-close only
occurs during the exec(). Perhaps this would not be an issue with
a different process/threading model, but that is another discussion
entirely.
Do you disagree there is an issue?
Yes.  system() is defined as being unsafe for a threaded application
to call.  I pointed this out in the last thread.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help