mirror of https://github.com/python/cpython
merging revision 73819 from trunk
This commit is contained in:
parent
04cecafce1
commit
8c4f4178cb
|
@ -445,7 +445,12 @@ class TCPServer(BaseServer):
|
|||
|
||||
def close_request(self, request):
|
||||
"""Called to clean up an individual request."""
|
||||
request.shutdown(socket.SHUT_WR)
|
||||
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.close()
|
||||
|
||||
|
||||
|
|
|
@ -182,6 +182,8 @@ 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:
|
||||
|
|
|
@ -130,12 +130,6 @@ 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;
|
||||
|
|
Loading…
Reference in New Issue