Fix for Issue #1277
Description
This MR addresses Issue #1277
Changes Made
I found that read appears to sometimes return 0 bytes read immediately after a successful (non 0 byte read). As a 0 byte read was handled the same as an error the command queue was emptied in this condition. I've added a separate retval of -2 for a 0 byte read which still closes the read pipe but does not clear the command queue. Only errors and a cancel command now do so.
Merge Request Checklists
-
Code follows project coding guidelines and its checklist -
(N/A) I have submitted a MR in the documentation repository if required -
I have updated Changelog and NEWS, listing the related issues. -
(N/A) If my MR introduces new dependencies, I have run all the CIs, even the optional (manual) jobs.