From 7e484865894b98de7a976a688c19e64bdd13dade Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Aug 2011 18:53:00 +0100 Subject: [PATCH] test_qemu: pclose may return any != 0 on error. In particular pclose returns a status > 0 if the command fails. (cherry picked from commit a24652c7b27e8494268ccb6c9a5a2e5541ba5efd) --- src/launch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/launch.c b/src/launch.c index ca48bdd..310a88d 100644 --- a/src/launch.c +++ b/src/launch.c @@ -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; -- 1.8.3.1