RFR 8067105: Socket returned by ServerSocket.accept() is inherited by child process on Windows
Alan Bateman
Alan.Bateman at oracle.com
Wed Jan 28 21:24:05 UTC 2015
On 28/01/2015 20:01, Chris Hegarty wrote:
> Reviving an old code review [1], after further investigation…
>
> Pertinent details from previous review:
> "A socket connection which is returned by ServerSocket.accept() is
> inherited by a child process. The expected behavior is that the socket
> connection is not inherited by the child process. This is an oversight
> in the original implementation, that only sets HANDLE_FLAG_INHERIT for
> newly created sockets.
>
> The native socket returned by ServerSocket.accept() should be configured
> so it will not be inherited by a child process,
> SetHandleInformation(<HANDLE>, HANDLE_FLAG_INHERIT, FALSE)."
> http://cr.openjdk.java.net/~chegar/8067105/webrev.00/webrev/
> <http://cr.openjdk.java.net/%7Echegar/8067105/webrev.00/webrev/>
>
I think you'll need to check for AcceptEx usages too but this is
otherwise okay.
-Alan
More information about the net-dev
mailing list