Review Request: JDK-8001334 - Remove use of JVM_* functions from java.io code (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Fri Feb 1 17:51:06 UTC 2013
- Previous message: Review Request: JDK-8001334 - Remove use of JVM_* functions from java.io code
- Next message: Review Request: JDK-8001334 - Remove use of JVM_* functions from java.io code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 01/02/2013 17:45, Martin Buchholz wrote:
Yes, the current Process code deals fairly well with other people's file descriptors that are not close-on-exec. But this code is brittle, and long-term it would be cleaner for all open's in the jdk to use OCLOEXEC by default. We can probably never remove the Process code that closes all file descriptors, because native user code could also create file descriptors. In the near term, until all the posixoid systems we (might) run on support OCLOEXEC, it seems better to leave this code as is. Or for general cleanliness, add OCLOEXEC by reflex whenever opening a file, without expectation that users will ever see the benefit, unless they roll their own fork-exec. There are lots of places in the JDK that open files or sockets, java.io is just one. It may be better if we separate this from Dan's clean-up and decide (as part of a separate piece of work) whether we want everywhere to enable close-on-exec on its file descriptors or just leave it to Process.exec as we do now.
-Alan
- Previous message: Review Request: JDK-8001334 - Remove use of JVM_* functions from java.io code
- Next message: Review Request: JDK-8001334 - Remove use of JVM_* functions from java.io code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]