From: Cole Robinson Date: Mon, 25 Apr 2016 16:43:44 +0000 (-0400) Subject: fdstream: Raise explicit error when iohelper gets SIGPIPE X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c48db92fbd1776a46127c3e988a1650bfd5dcd53;p=libvirt.git fdstream: Raise explicit error when iohelper gets SIGPIPE This happens when virStreamFinish/Abort are called, but iohelper still has data to process. --- diff --git a/src/fdstream.c b/src/fdstream.c index 8e5fa2fd0e..a019af6429 100644 --- a/src/fdstream.c +++ b/src/fdstream.c @@ -264,6 +264,10 @@ virFDStreamCloseCommand(struct virFDStreamData *fdst) if (status != 0) { if (buf[0] != '\0') { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", buf); + } else if (WIFSIGNALED(status) && WTERMSIG(status) == SIGPIPE) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("I/O helper exited " + "before all data was processed")); } else { char *str = virProcessTranslateStatus(status); virReportError(VIR_ERR_INTERNAL_ERROR,