summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-04 00:11:37 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-04 00:11:37 +0100
commitb3e2f00f39d6edafda6e5508a926ebd244997a0f (patch)
tree6437a40ea85c1e56e715260cf45b919281b27a31
parent66624ff0d9e1de2fc5eb4f95f3a3a2ed70b10138 (diff)
downloadvim-git-b3e2f00f39d6edafda6e5508a926ebd244997a0f.tar.gz
patch 7.4.1256v7.4.1256
Problem: On Mac sys.exit(0) doesn't kill the test server. Solution: Use self.server.shutdown(). (Jun Takimoto)
-rw-r--r--src/testdir/test_channel.py9
-rw-r--r--src/version.c2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py
index dbf9eb2c7..fb75938c1 100644
--- a/src/testdir/test_channel.py
+++ b/src/testdir/test_channel.py
@@ -98,7 +98,8 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
response = last_eval
elif decoded[1] == '!quit!':
# we're done
- sys.exit(0)
+ self.server.shutdown()
+ break
elif decoded[1] == '!crash!':
# Crash!
42 / 0
@@ -127,7 +128,6 @@ if __name__ == "__main__":
server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
- server_thread.daemon = True
server_thread.start()
# Write the port number in Xportnr, so that the test knows it.
@@ -135,6 +135,7 @@ if __name__ == "__main__":
f.write("{}".format(port))
f.close()
- # Block here
print("Listening on port {}".format(port))
- server.serve_forever()
+
+ # Main thread terminates, but the server continues running
+ # until server.shutdown() is called.
diff --git a/src/version.c b/src/version.c
index 0f87c416f..b318dc710 100644
--- a/src/version.c
+++ b/src/version.c
@@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1256,
+/**/
1255,
/**/
1254,