rpms/libguestfs/devel guestfs-daemon-waitpid.patch, NONE, 1.1 libguestfs.spec, 1.56, 1.57

Richard W.M. Jones rjones at fedoraproject.org
Sat Jun 20 15:08:07 UTC 2009


Author: rjones

Update of /cvs/pkgs/rpms/libguestfs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20742

Modified Files:
	libguestfs.spec 
Added Files:
	guestfs-daemon-waitpid.patch 
Log Message:
- Pull in upstream patch to check waitpid return values
  (testing as possible fix for RHBZ#507066).


guestfs-daemon-waitpid.patch:

--- NEW FILE guestfs-daemon-waitpid.patch ---
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 2e83b9f..030aabe 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -453,7 +453,8 @@ commandrv (char **stdoutput, char **stderror, char * const* const argv)
 {
   int so_size = 0, se_size = 0;
   int so_fd[2], se_fd[2];
-  int pid, r, quit, i;
+  pid_t pid;
+  int r, quit, i;
   fd_set rset, rset2;
   char buf[256];
   char *p;
@@ -589,7 +590,10 @@ commandrv (char **stdoutput, char **stderror, char * const* const argv)
   }
 
   /* Get the exit status of the command. */
-  waitpid (pid, &r, 0);
+  if (waitpid (pid, &r, 0) != pid) {
+    perror ("waitpid");
+    return -1;
+  }
 
   if (WIFEXITED (r)) {
     return WEXITSTATUS (r);


Index: libguestfs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libguestfs/devel/libguestfs.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -p -r1.56 -r1.57
--- libguestfs.spec	20 Jun 2009 13:58:55 -0000	1.56
+++ libguestfs.spec	20 Jun 2009 15:07:36 -0000	1.57
@@ -4,7 +4,7 @@
 Summary:     Access and modify virtual machine disk images
 Name:        libguestfs
 Version:     1.0.49
-Release:     4%{?dist}
+Release:     5%{?dist}
 License:     LGPLv2+
 Group:       Development/Libraries
 URL:         http://libguestfs.org/
@@ -13,6 +13,8 @@ BuildRoot:   %{_tmppath}/%{name}-%{versi
 
 # Upstream: 3c5b447efd42b03c24104bdc1f3260e879bb1d25
 Patch0:      guestfs-daemon-find.patch
+# Upstream: 6654f617a6f720baa8f1ced89179e11679353d1e
+Patch1:      guestfs-daemon-waitpid.patch
 
 # Basic build requirements:
 BuildRequires: /usr/bin/pod2man
@@ -253,6 +255,7 @@ Requires:    jpackage-utils
 %setup -q
 
 %patch0 -p1
+%patch1 -p1
 
 mkdir -p daemon/m4
 
@@ -498,10 +501,12 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Sat Jun 20 2009 Richard W.M. Jones <rjones at redhat.com> - 1.0.49-4
+* Sat Jun 20 2009 Richard W.M. Jones <rjones at redhat.com> - 1.0.49-5
 - Remove workaround for RHBZ#507007, since bug is now fixed.
 - Pull in upstream patch to fix pclose checking
   (testing as possible fix for RHBZ#507066).
+- Pull in upstream patch to check waitpid return values
+  (testing as possible fix for RHBZ#507066).
 
 * Fri Jun 19 2009 Richard W.M. Jones <rjones at redhat.com> - 1.0.49-2
 - New upstream release 1.0.49.




More information about the fedora-extras-commits mailing list