tools: console: Relax stream EOF handling
Regular VM shutdown triggers the error for existing session of virsh console and it returns with non-zero exit code: error: internal error: console stream EOF The message and status code are misleading because there's no real error. virStreamRecv returns 0 correctly when EOF is reached. Existing implementations of esx, fd, and remote streams behave the same for virStreamFinish and virStreamAbort: they close the stream. So, we can continue to use virStreamAbort to handle EOF and errors from virStreamRecv but additonally we can report error if virStreamAbort fails. Fixes: 29f2b524 ("tools: console: pass stream/fd errors to user") Signed-off-by: NRoman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Showing
想要评论请 注册 或 登录