summaryrefslogtreecommitdiffstats
path: root/Demo/sockets
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2003-08-01 14:20:02 (GMT)
committerSkip Montanaro <skip@pobox.com>2003-08-01 14:20:02 (GMT)
commit9463792c686c312dcf85c649b7183eae25403945 (patch)
tree45fc079ce0a24e5922df6e1b8517c57951df6c8a /Demo/sockets
parentcb3988c48be10efee3fe27ede0951df3ab3b875f (diff)
downloadcpython-9463792c686c312dcf85c649b7183eae25403945.zip
cpython-9463792c686c312dcf85c649b7183eae25403945.tar.gz
cpython-9463792c686c312dcf85c649b7183eae25403945.tar.bz2
To be a good citizen, it should really delete its socket when done.
Diffstat (limited to 'Demo/sockets')
-rw-r--r--Demo/sockets/unixserver.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Demo/sockets/unixserver.py b/Demo/sockets/unixserver.py
index d4c7061..d4425f0 100644
--- a/Demo/sockets/unixserver.py
+++ b/Demo/sockets/unixserver.py
@@ -1,5 +1,6 @@
# Echo server demo using Unix sockets (handles one connection only)
# Piet van Oostrum
+import os
from socket import *
FILE = 'blabla'
s = socket(AF_UNIX, SOCK_STREAM)
@@ -13,3 +14,4 @@ while 1:
if not data: break
conn.send(data)
conn.close()
+os.unlink(FILE)