1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-08 08:45:44 +02:00
cdt/core
Andreas Dangel f40c48151c Speed up closing all file descriptors in the child process (Fixes #835)
When _SC_OPEN_MAX (max nr of open files limit per process) is a very
big number, then closing all possible file handles can take a while.
This change first tries to use the syscall close_range() if available,
falling back to use /proc/self/fd to close only open file handles,
and lastly falling back to the old way of closing all possible handles
one after another.
In general, the first or second approach should be available
which speeds up the pty spawning.

Refs JetBrains/pty4j#147
Copied from 04685d870f
(which is EPL 1.0)

Co-authored-by: Sergey Simonchik <sergey.simonchik@jetbrains.com>
cherry picked and squashed from commits:
- 7bd8d52c6c
- 24d9bd1834
- 3875408070
2024-06-28 21:47:00 -04:00
..
org.eclipse.cdt.core LLVM optimization remarks. (#803) 2024-05-29 08:53:59 -04:00
org.eclipse.cdt.core.linux Prepare repo for 11.6.1 development 2024-06-24 08:30:00 -04:00
org.eclipse.cdt.core.linux.aarch64 Speed up closing all file descriptors in the child process (Fixes #835) 2024-06-28 21:47:00 -04:00
org.eclipse.cdt.core.linux.ppc64le Speed up closing all file descriptors in the child process (Fixes #835) 2024-06-28 21:47:00 -04:00
org.eclipse.cdt.core.linux.x86_64 Speed up closing all file descriptors in the child process (Fixes #835) 2024-06-28 21:47:00 -04:00
org.eclipse.cdt.core.macosx Speed up closing all file descriptors in the child process (Fixes #835) 2024-06-28 21:47:00 -04:00
org.eclipse.cdt.core.native Speed up closing all file descriptors in the child process (Fixes #835) 2024-06-28 21:47:00 -04:00
org.eclipse.cdt.core.tests Prepare repo for 11.6.1 development 2024-06-24 08:30:00 -04:00
org.eclipse.cdt.core.win32 Prepare repo for 11.6.1 development 2024-06-24 08:30:00 -04:00
org.eclipse.cdt.core.win32.x86_64 Prepare repo for 11.6.1 development 2024-06-24 08:30:00 -04:00
org.eclipse.cdt.ui [#808] Support overriden default-editor-association in EditorUtility (#809) 2024-05-31 13:16:03 -04:00
org.eclipse.cdt.ui.tests Prepare repo for 11.6.1 development 2024-06-24 08:30:00 -04:00
pom.xml Prepare repo for 11.6.1 development 2024-06-24 08:30:00 -04:00