test_qemu: pclose may return any != 0 on error.

In particular pclose returns a status > 0 if the command fails.
(cherry picked from commit a24652c7b2)
This commit is contained in:
Richard W.M. Jones
2011-08-23 18:53:00 +01:00
parent d28f8f4cc3
commit 7e48486589

View File

@@ -1083,7 +1083,7 @@ test_qemu_cmd (guestfs_h *g, const char *cmd, char **ret)
return -1;
}
if (pclose (fp) == -1)
if (pclose (fp) != 0)
return -1;
return 0;