Richard W.M. Jones
2009-Aug-22 09:43 UTC
[Libguestfs] [PATCH] Add waitpid along guestfs_close path (RHBZ#518747)
Not quite sure what happened to the waitpid()s which were along that path, but at some point they seem to have got deleted. This is a fix for: https://bugzilla.redhat.com/show_bug.cgi?id=518747 I haven't been able to run the tests yet however, because currently Rawhide is broken (ntfsprogs has missing dependencies). Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html -------------- next part -------------->From 0abb1ec2b3f0e1f482f93b1c8b3d2ef59bc0321e Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at trick.home.annexia.org> Date: Sat, 22 Aug 2009 10:40:42 +0100 Subject: [PATCH] Add waitpid along guestfs_close path (RHBZ#518747). --- src/guestfs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/guestfs.c b/src/guestfs.c index 04bd4e8..204125b 100644 --- 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); -- 1.6.2.5
Richard W.M. Jones
2009-Aug-24 08:27 UTC
[Libguestfs] [PATCH] Add waitpid along guestfs_close path (RHBZ#518747)
On Sat, Aug 22, 2009 at 10:43:27AM +0100, Richard W.M. Jones wrote:> > Not quite sure what happened to the waitpid()s which were along that > path, but at some point they seem to have got deleted. This is a fix > for: > > https://bugzilla.redhat.com/show_bug.cgi?id=518747 > > I haven't been able to run the tests yet however, because currently > Rawhide is broken (ntfsprogs has missing dependencies).I have now completed the tests successfully. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
Possibly Parallel Threads
- Remove temporary directories created during appliance building along error paths (RHBZ#769680)
- [PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
- Bug in bsd-waitpid.c and bsd-nextstep.c
- Re: [PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
- [PATCH] appliance: Add ntfs-3g-system-compression (RHBZ#1703463).