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:
89c3e55
)
Add waitpid along guestfs_close path (RHBZ#518747).
author
Richard Jones
<rjones@trick.home.annexia.org>
Sat, 22 Aug 2009 09:40:42 +0000
(10:40 +0100)
committer
Richard Jones
<rjones@trick.home.annexia.org>
Sat, 22 Aug 2009 09:40:42 +0000
(10:40 +0100)
src/guestfs.c
patch
|
blob
|
history
diff --git
a/src/guestfs.c
b/src/guestfs.c
index
04bd4e8
..
204125b
100644
(file)
--- a/
src/guestfs.c
+++ b/
src/guestfs.c
@@
-348,6
+348,10
@@
guestfs_close (guestfs_h *g)
g->fd[1] = -1;
g->sock = -1;
+ /* Wait for subprocess(es) to exit. */
+ waitpid (g->pid, NULL, 0);
+ if (g->recoverypid > 0) waitpid (g->recoverypid, NULL, 0);
+
/* Remove tmpfiles. */
if (g->tmpdir) {
snprintf (filename, sizeof filename, "%s/sock", g->tmpdir);