mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.1256
Problem: On Mac sys.exit(0) doesn't kill the test server. Solution: Use self.server.shutdown(). (Jun Takimoto)
This commit is contained in:
@@ -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.
|
||||
|
@@ -742,6 +742,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1256,
|
||||
/**/
|
||||
1255,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user