Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to retrieve exit code of a failed service call
When service call fails, the remote (service) side sends EOF + exit code and closes the vchan immediately. If the client side tries to send something, it will fail and exit immediately (with code 1). But reading data that was queued in the vchan before its closing is still possible. So, on send error check if there is anything interesting to receive (especially exit code, but potentially also some service output) and, if yes, don't exit immediately. Since the service exit code is sent last (after all stdout/stderr data and their EOF), it's okay to check just for remote_status. This is relevant only to the service client side, as exit status of the service-handling process is not relevant. Fixes QubesOS/qubes-issues#9618
- Loading branch information