Comment 2 for bug 1646042

Revision history for this message
Richard Huddie (rhuddie) wrote :

Some more investigation shows some slightly different behaviour depending on what format data is sent in. If there is a single line (as above in echo example) of >4096 bytes then it is received as a 4096 chunk using a read() and executed, appending '\n'. The remaining commands from next chunk don't get executed in this case.

If there are commands sent on multiple lines, (e.g. socket.send(b'echo aaa\necho bbb\n')) then each line is received in a separate read() and then executed. Result of each read() is returned in a write(). If the individual lines exceed 4096 then they will also be truncated.

For the case of the test log file the lines are less than 4096, but the last command hangs on write(), which I've not been able to reproduce yet using a dummy script.