diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinSock.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c index d20a5fe..00e7f22 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.3 1998/09/14 18:40:20 stanton Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.4 1998/12/04 01:01:55 stanton Exp $ */ #include "tclInt.h" @@ -903,6 +903,13 @@ CreateSocket(interp, port, host, server, myaddr, myport, async) } /* + * Win-NT has a misfeature that sockets are inherited in child + * processes by default. Turn off the inherit bit. + */ + + SetHandleInformation( (HANDLE) sock, HANDLE_FLAG_INHERIT, 0 ); + + /* * Set kernel space buffering */ @@ -1397,6 +1404,13 @@ TcpAccept(infoPtr) } /* + * Win-NT has a misfeature that sockets are inherited in child + * processes by default. Turn off the inherit bit. + */ + + SetHandleInformation( (HANDLE) newSocket, HANDLE_FLAG_INHERIT, 0 ); + + /* * Add this socket to the global list of sockets. */ |