virPipeImpl: Don't overwrite error

If WITH_PIPE2 is not defined we attempt to set the pipe to nonblocking
operation after they are created. We errorneously rewrote the existing
error message on failure to do so or even reported an error if quiet
mode was requested.

Fixes: ab36f729470c313b9d5b7debdbeac441f7780dec
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-03-01 10:25:18 +01:00
parent 2339e73f71
commit ae87dc3d09

View File

@ -1924,8 +1924,6 @@ virPipeImpl(int fds[2], bool nonblock, bool errreport)
if (errreport)
virReportSystemError(errno, "%s",
_("Unable to set pipes to non-blocking"));
virReportSystemError(errno, "%s",
_("Unable to create pipes"));
VIR_FORCE_CLOSE(fds[0]);
VIR_FORCE_CLOSE(fds[1]);
return -1;