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:
eb304e9
)
check the pid is > 0 before calling waitpid()
author
Angus Salkeld
<asalkeld@redhat.com>
Mon, 14 Mar 2011 11:40:12 +0000
(22:40 +1100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Mon, 14 Mar 2011 12:05:30 +0000
(12:05 +0000)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
src/launch.c
patch
|
blob
|
history
diff --git
a/src/launch.c
b/src/launch.c
index
e50985d
..
8de2857
100644
(file)
--- a/
src/launch.c
+++ b/
src/launch.c
@@
-769,7
+769,7
@@
launch_appliance (guestfs_h *g)
}
if (g->pid > 0) kill (g->pid, 9);
if (g->recoverypid > 0) kill (g->recoverypid, 9);
- waitpid (g->pid, NULL, 0);
+
if (g->pid > 0)
waitpid (g->pid, NULL, 0);
if (g->recoverypid > 0) waitpid (g->recoverypid, NULL, 0);
g->fd[0] = -1;
g->fd[1] = -1;