summaryrefslogtreecommitdiffstats
path: root/Demo/threads
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-05-16 09:30:26 (GMT)
committerGuido van Rossum <guido@python.org>1994-05-16 09:30:26 (GMT)
commitdc3c53cf8d65bebd2ced151f693a78c47ae939de (patch)
tree427e62f21f1584a0d7532c13d13ead32d1ddf933 /Demo/threads
parent3ac5b00d4091e2c06bafe5fc5fb18798d3fa701b (diff)
downloadcpython-dc3c53cf8d65bebd2ced151f693a78c47ae939de.zip
cpython-dc3c53cf8d65bebd2ced151f693a78c47ae939de.tar.gz
cpython-dc3c53cf8d65bebd2ced151f693a78c47ae939de.tar.bz2
Don't use thread.exit_prog; let child die if EOF read
Diffstat (limited to 'Demo/threads')
-rw-r--r--Demo/threads/telnet.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Demo/threads/telnet.py b/Demo/threads/telnet.py
index 5d4ae76..f63d955 100644
--- a/Demo/threads/telnet.py
+++ b/Demo/threads/telnet.py
@@ -72,7 +72,7 @@ def parent(s):
if not data:
# EOF -- exit
sys.stderr.write( '(Closed by remote host)\n')
- thread.exit_prog(1)
+ sys.exit(1)
cleandata = ''
for c in data:
if opt:
@@ -108,6 +108,7 @@ def child(s):
while 1:
line = sys.stdin.readline()
## print 'Got:', `line`
+ if not line: break
s.send(line)
main()