On Mon, 28 Jul 2025 16:13:04 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> > Note that in the official Runtime.exec layer over in libjava, we switched 
> > to setting the filedescriptors to FD_CLOEXEC, which seems more elegant and 
> > circumvents this and some other problems.
> 
> Are you talking about what is being done in os::open()? What about opens done 
> that don't go through os::open() such as opens from app native code?

No, I am talking about this: 
https://github.com/openjdk/jdk/blob/4669005123420d8dbe86740dd9bcbee04735bc4f/src/java.base/unix/native/libjava/childproc.c#L109

where we close all file descriptors apart from the ones we need to communicate 
to the jspawnhelper.

> 
> In any case, I think this is beyond the scope of this PR. Maybe an RFE could 
> be filed for it if you think it is worth doing.

Sure thing

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26487#issuecomment-3130861629

Reply via email to