Windows: create non-inheritable sockets in one step instead of creating a
socket and only then marking it as non-inheritable.

This protects against a potential socket handle leak in case of certain race
conditions.

See also:
https://support.microsoft.com/en-us/help/2398202/an-application-may-stop-responding-when-the-application-closes-a-socke

* network_io/win32/sockets.c
  (apr_socket_create): Use the WSA_FLAG_NO_HANDLE_INHERITED when supported by
   the OS.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1861073 13f79535-47bb-0310-9956-ffa450edef68
1 file changed