]> xenbits.xensource.com Git - libvirt.git/commitdiff
fdstream: Raise explicit error when iohelper gets SIGPIPE
authorCole Robinson <crobinso@redhat.com>
Mon, 25 Apr 2016 16:43:44 +0000 (12:43 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 2 May 2016 14:13:04 +0000 (10:13 -0400)
This happens when virStreamFinish/Abort are called, but iohelper
still has data to process.

src/fdstream.c

index 8e5fa2fd0ebaff9142a500a6b75628a943c8974a..a019af6429a371bf497c09a13f4e8e9bdd3dff7d 100644 (file)
@@ -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,