diff options
-rw-r--r-- | src/guestfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/guestfs.c b/src/guestfs.c index 8b7ab4d7..40855066 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -212,7 +212,7 @@ guestfs_close (guestfs_h *g) g->sock = -1; /* Wait for subprocess(es) to exit. */ - waitpid (g->pid, NULL, 0); + if (g->pid > 0) waitpid (g->pid, NULL, 0); if (g->recoverypid > 0) waitpid (g->recoverypid, NULL, 0); /* Remove tmpfiles. */ |