Skip to content

Commit 608a891

Browse files
committed
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".
1 parent e7bed62 commit 608a891

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

src/testdir/test_channel.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,34 @@ def handle(self):
3434
thesocket = self.request
3535
while True:
3636
try:
37-
data = self.request.recv(4096).decode('utf-8')
37+
received = self.request.recv(4096).decode('utf-8')
3838
except socket.error:
3939
print("=== socket error ===")
4040
break
4141
except IOError:
4242
print("=== socket closed ===")
4343
break
44-
if data == '':
44+
if received == '':
4545
print("=== socket closed ===")
4646
break
47-
print("received: {}".format(data))
47+
print("received: {}".format(received))
4848

4949
# We may receive two messages at once. Take the part up to the
5050
# matching "]" (recognized by finding "][").
51-
while data != '':
52-
splitidx = data.find('][')
51+
todo = received
52+
while todo != '':
53+
splitidx = todo.find('][')
5354
if splitidx < 0:
54-
todo = data
55-
data = ''
55+
used = todo
56+
todo = ''
5657
else:
57-
todo = data[:splitidx + 1]
58-
data = data[splitidx + 1:]
59-
print("using: {}".format(todo))
58+
used = todo[:splitidx + 1]
59+
todo = todo[splitidx + 1:]
60+
if used != received:
61+
print("using: {}".format(used))
6062

6163
try:
62-
decoded = json.loads(todo)
64+
decoded = json.loads(used)
6365
except ValueError:
6466
print("json decoding failed")
6567
decoded = [-1, '']

src/testdir/test_channel.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func s:kill_server()
5959
if has('win32')
6060
call system('taskkill /IM py.exe /T /F /FI "WINDOWTITLE eq test_channel"')
6161
else
62-
call system("pkill --full test_channel.py")
62+
call system("pkill -f test_channel.py")
6363
endif
6464
endfunc
6565

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ static char *(features[]) =
742742

743743
static int included_patches[] =
744744
{ /* Add new patch number below this line */
745+
/**/
746+
1253,
745747
/**/
746748
1252,
747749
/**/

0 commit comments

Comments
 (0)