summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2008-07-15 18:29:18 (GMT)
committerJesse Noller <jnoller@gmail.com>2008-07-15 18:29:18 (GMT)
commit9949d6ed4b74e50566abc85ac0154a664e6436ee (patch)
tree6db78523ad668f8eb87a0ea18279a272e1754d19
parent2bad6577a1ab608096c8c4609f282b5daba5e467 (diff)
downloadcpython-9949d6ed4b74e50566abc85ac0154a664e6436ee.zip
cpython-9949d6ed4b74e50566abc85ac0154a664e6436ee.tar.gz
cpython-9949d6ed4b74e50566abc85ac0154a664e6436ee.tar.bz2
Revert 3270 patch: self._address is in pretty widespread use, need to revisit
-rw-r--r--Lib/multiprocessing/connection.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index 2f9701c..8a3748c 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -215,14 +215,16 @@ class SocketListener(object):
self._socket = socket.socket(getattr(socket, family))
self._socket.bind(address)
self._socket.listen(backlog)
+ address = self._socket.getsockname()
+ if type(address) is tuple:
+ address = (socket.getfqdn(address[0]),) + address[1:]
+ self._address = address
self._family = family
self._last_accepted = None
- sub_debug('listener bound to address %r', self._address)
-
if family == 'AF_UNIX':
self._unlink = Finalize(
- self, os.unlink, args=(self._address,), exitpriority=0
+ self, os.unlink, args=(address,), exitpriority=0
)
else:
self._unlink = None