git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f88a20
)
check the pid is > 0 before calling waitpid()
author
Angus Salkeld
<asalkeld@redhat.com>
Tue, 15 Mar 2011 11:43:02 +0000
(22:43 +1100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Mon, 21 Mar 2011 11:29:10 +0000
(11:29 +0000)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
(cherry picked from commit
d1f1f74e5f45fa5b94ebb096fa65fa33ecc23d09
)
src/guestfs.c
patch
|
blob
|
history
diff --git
a/src/guestfs.c
b/src/guestfs.c
index
488b658
..
bd1d0f3
100644
(file)
--- a/
src/guestfs.c
+++ b/
src/guestfs.c
@@
-214,7
+214,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. */