When the debug agent forks a child process, it closes all open files in the child process that were copied over from the parent process. A better approach is to instead set the FD_CLOEXEC flag on open files before doing the fork. See for example markDescriptorsCloseOnExec() in childproc.c.
- relates to
-
JDK-8361873 [GCC static analyzer] exec_md.c forkedChildProcess potential double 'close' of file descriptor '3'
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk/26568