From: Charles-François Natali Date: Tue, 24 May 2011 16:27:25 +0000 (+0200) Subject: Issue #5715: In socketserver, close the server socket in the child process. X-Git-Tag: v3.2.1rc2~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf057597e6d91c93dbb8bf63e1151d2b2da580d5;p=thirdparty%2FPython%2Fcpython.git Issue #5715: In socketserver, close the server socket in the child process. --- cf057597e6d91c93dbb8bf63e1151d2b2da580d5 diff --cc Lib/socketserver.py index 089b3bac1129,76ac50a619c5..f42802c27a90 --- a/Lib/socketserver.py +++ b/Lib/socketserver.py @@@ -552,10 -532,9 +552,10 @@@ class ForkingMixIn else: # Child process. # This must never return, hence os._exit()! + self.socket.close() try: self.finish_request(request, client_address) + self.shutdown_request(request) os._exit(0) except: try: diff --cc Misc/NEWS index fac8078edbe9,17f933a8ac71..fc54f8905af5 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -10,37 -10,67 +10,39 @@@ What's New in Python 3.2.1 release cand Core and Builtins ----------------- -- Correct lookup of __dir__ on objects. Among other things, this causes errors - besides AttributeError found on lookup to be propagated. - -- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal - module. Patch written by Charles-François Natali. - -- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, - clear the end-of-file indicator after CTRL+d. - -- Issue #9756: When calling a method descriptor or a slot wrapper descriptor, - the check of the object type doesn't read the __class__ attribute anymore. - Fix a crash if a class override its __class__ attribute (e.g. a proxy of the - str type). Patch written by Andreas Stührk. - -- Issue #6780: fix starts/endswith error message to mention that tuples are - accepted too. - -- Issue #5057: fix a bug in the peepholer that led to non-portable pyc files - between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP - chars (e.g. "\U00012345"[0]). +Library +------- -- Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted - (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch - written by Charles-Francois Natali. ++- Issue #5715: In socketserver, close the server socket in the child process. + -- Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file - doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int - (length bigger than 2^31-1 bytes). +- Correct lookup of __dir__ on objects. Among other things, this causes errors + besides AttributeError found on lookup to be propagated. -- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when - there are many tags (e.g. when using mq). Patch by Nadeem Vawda. +- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore + to be able to unload the module. -- Issue #10451: memoryview objects could allow to mutate a readable buffer. - Initial patch by Ross Lagerwall. +- Issue #12065: connect_ex() on an SSL socket now returns the original errno + when the socket's timeout expires (it used to return None). -- Issue #10892: Don't segfault when trying to delete __abstractmethods__ from a - class. -- Issue #8020: Avoid a crash where the small objects allocator would read - non-Python managed memory while it is being modified by another thread. - Patch by Matt Bandy. -- Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime() - can now handle dates after 2038. +What's New in Python 3.2.1 release candidate 1? +=============================================== -- issue #11828: startswith and endswith don't accept None as slice index. - Patch by Torsten Becker. +*Release date: 15-May-2011* -- Issue #4236: PyModule_Create2 now checks the import machinery directly - rather than the Py_IsInitialized flag, avoiding a Fatal Python - error in certain circumstances when an import is done in __del__. +Core and Builtins +----------------- -- Issue #10596: Fix float.__mod__ to have the same behaviour as - float.__divmod__ with respect to signed zeros. -4.0 % 4.0 should be - 0.0, not -0.0. +- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal + module. Patch written by Charles-François Natali. -- Issue #5587: add a repr to dict_proxy objects. Patch by David Stanek and - Daniel Urban. +- Issue #12044: Fixed subprocess.Popen when used as a context manager to + wait for the process to end when exiting the context to avoid unintentionally + leaving zombie processes around. -- Issue #11506: Trying to assign to a bytes literal should result in a - SyntaxError. +- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, + clear the end-of-file indicator after CTRL+d. Library -------