mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Avoid problem resolving 'localhost'
M PyShell.py M rpc.py M run.py
This commit is contained in:
parent
852f35bbeb
commit
24d7e0cbb8
3 changed files with 8 additions and 4 deletions
|
@ -17,6 +17,8 @@ import interrupt
|
|||
|
||||
import __main__
|
||||
|
||||
LOCALHOST = '127.0.0.1'
|
||||
|
||||
# Thread shared globals: Establish a queue between a subthread (which handles
|
||||
# the socket) and the main thread (which runs user code), plus global
|
||||
# completion and exit flags:
|
||||
|
@ -52,7 +54,7 @@ def main(del_exitfunc=False):
|
|||
sys.argv[:] = [""]
|
||||
sockthread = threading.Thread(target=manage_socket,
|
||||
name='SockThread',
|
||||
args=(('localhost', port),))
|
||||
args=((LOCALHOST, port),))
|
||||
sockthread.setDaemon(True)
|
||||
sockthread.start()
|
||||
while 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue