From: Richard W.M. Jones Date: Tue, 23 Aug 2011 17:53:00 +0000 (+0100) Subject: test_qemu: pclose may return any != 0 on error. X-Git-Tag: 1.13.7~8 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a24652c7b27e8494268ccb6c9a5a2e5541ba5efd;p=libguestfs.git test_qemu: pclose may return any != 0 on error. In particular pclose returns a status > 0 if the command fails. --- diff --git a/src/launch.c b/src/launch.c index cb0f637..11d1acf 100644 --- a/src/launch.c +++ b/src/launch.c @@ -1110,7 +1110,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;