forked from aniani/vim
patch 7.4.1253
Problem: Python test server not displaying second of two commands. Solaris doesn't have "pkill --full". Solution: Also echo the second command. Use "pkill -f".
This commit is contained in:
@@ -34,32 +34,34 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
|
|||||||
thesocket = self.request
|
thesocket = self.request
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
data = self.request.recv(4096).decode('utf-8')
|
received = self.request.recv(4096).decode('utf-8')
|
||||||
except socket.error:
|
except socket.error:
|
||||||
print("=== socket error ===")
|
print("=== socket error ===")
|
||||||
break
|
break
|
||||||
except IOError:
|
except IOError:
|
||||||
print("=== socket closed ===")
|
print("=== socket closed ===")
|
||||||
break
|
break
|
||||||
if data == '':
|
if received == '':
|
||||||
print("=== socket closed ===")
|
print("=== socket closed ===")
|
||||||
break
|
break
|
||||||
print("received: {}".format(data))
|
print("received: {}".format(received))
|
||||||
|
|
||||||
# We may receive two messages at once. Take the part up to the
|
# We may receive two messages at once. Take the part up to the
|
||||||
# matching "]" (recognized by finding "][").
|
# matching "]" (recognized by finding "][").
|
||||||
while data != '':
|
todo = received
|
||||||
splitidx = data.find('][')
|
while todo != '':
|
||||||
|
splitidx = todo.find('][')
|
||||||
if splitidx < 0:
|
if splitidx < 0:
|
||||||
todo = data
|
used = todo
|
||||||
data = ''
|
todo = ''
|
||||||
else:
|
else:
|
||||||
todo = data[:splitidx + 1]
|
used = todo[:splitidx + 1]
|
||||||
data = data[splitidx + 1:]
|
todo = todo[splitidx + 1:]
|
||||||
print("using: {}".format(todo))
|
if used != received:
|
||||||
|
print("using: {}".format(used))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
decoded = json.loads(todo)
|
decoded = json.loads(used)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("json decoding failed")
|
print("json decoding failed")
|
||||||
decoded = [-1, '']
|
decoded = [-1, '']
|
||||||
|
@@ -59,7 +59,7 @@ func s:kill_server()
|
|||||||
if has('win32')
|
if has('win32')
|
||||||
call system('taskkill /IM py.exe /T /F /FI "WINDOWTITLE eq test_channel"')
|
call system('taskkill /IM py.exe /T /F /FI "WINDOWTITLE eq test_channel"')
|
||||||
else
|
else
|
||||||
call system("pkill --full test_channel.py")
|
call system("pkill -f test_channel.py")
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@@ -742,6 +742,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1253,
|
||||||
/**/
|
/**/
|
||||||
1252,
|
1252,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user