]> granicus.if.org Git - python/commitdiff
Revert last change, which was incorrect.
authorKristján Valur Jónsson <kristjan@ccpgames.com>
Sat, 4 Jul 2009 15:16:38 +0000 (15:16 +0000)
committerKristján Valur Jónsson <kristjan@ccpgames.com>
Sat, 4 Jul 2009 15:16:38 +0000 (15:16 +0000)
Lib/socketserver.py
Lib/test/test_sys.py
Modules/_multiprocessing/win32_functions.c

index 37df2bab33c76defea38af64bf9ecf65b17f4c35..e5f5778872fe96ea526240c3b25bf415f13aae80 100644 (file)
@@ -445,12 +445,7 @@ class TCPServer(BaseServer):
 
     def close_request(self, request):
         """Called to clean up an individual request."""
-        try:
-            #explicitly shutdown.  socket.close() merely releases
-            #the socket and waits for GC to perform the actual close.
-            request.shutdown(socket.SHUT_WR)
-        except socket.error:
-            pass #some platforms may raise ENOTCONN here
+        request.shutdown(socket.SHUT_WR)
         request.close()
 
 
index 898674175733a29c3f6228fcef96586870a87748..cac90f4dc979e280bd607f19799604965f52b2ea 100644 (file)
@@ -182,8 +182,6 @@ class SysModuleTest(unittest.TestCase):
                 "under Windows, test would generate a spurious crash dialog")
         code = textwrap.dedent("""
             import sys
-            import msvcrt
-            msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS)
 
             def f():
                 try:
index 379a49515e37e02d5e14957d9454165f2a9c8283..ba82c23517c1c8da90472f201073b761a96e8b28 100644 (file)
@@ -130,6 +130,12 @@ win32_ExitProcess(PyObject *self, PyObject *args)
        if (!PyArg_ParseTuple(args, "I", &uExitCode))
                return NULL;
 
+       #if defined(Py_DEBUG)
+               SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX);
+               _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+       #endif
+
+
        ExitProcess(uExitCode);
 
        return NULL;