[PATCH] SOCK_CLOEXEC for opening sockets
Alan Bateman
Alan.Bateman at oracle.com
Thu Jul 12 06:59:04 UTC 2018
On 12/07/2018 05:55, Andrew Luo wrote:
>
> Ok, fixed a few more places (and a bug where fcntl was being run on a
> -1 fd). Patch is below, let me know if there’s any other suggestions/etc.
>
The file system code should not be calling into NET_* functions. The
changes to net_util_* will also need cleanup. Otherwise I think you've
got all the places in the networking / NIO APIs, at least on Linux.
There are others on macOS, Solaris, ... of course.
That said, I assume we have many more places in the JDK that have file
descriptors to open files and other resources. If we really want to
support the case of someone calling fork/exec from JNI code then it will
likely need work in several other areas.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20180712/c522053d/attachment.html>
More information about the net-dev
mailing list