pclose: Fix other places where we only tested pclose == -1.
[libguestfs.git] / fish / fish.c
index efc74b2..c132911 100644 (file)
@@ -995,7 +995,7 @@ execute_and_inline (const char *cmd, int global_exit_on_error)
 
   free (line);
 
-  if (pclose (pp) == -1) {
+  if (pclose (pp) != 0) {
     perror ("pclose");
     return -1;
   }