This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10353] Methods for deleting all file descriptors greater than given integer
- From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 22 Apr 2019 19:18:27 +0000
- Subject: [Bug libc/10353] Methods for deleting all file descriptors greater than given integer
- Auto-submitted: auto-generated
- References: <bug-10353-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=10353
--- Comment #13 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Adhemerval Zanella from comment #8)
> In fact, IMHO a closefrom syscall won't help much for posix_spawn. Current
> implementation for Linux uses a clone(CLONE_VM, CLONE_VFORK) which means
> that only the calling thread will be suspended while the helper thread
> issues execlpe or _exit. It means that a file action to issue a closefrom
> will also be susceptible to race conditions in multi-thread environments.
In fact, this is not true since we do not use CLONE_FILES for posix_spawn. So
it is possible to implement posix_spawn_file_actions_addclosefrom_np, albeit it
would require interacting over the open file descriptors (and thus might incur
in performance issues).
--
You are receiving this mail because:
You are on the CC list for the bug.