summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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