- Pull in upstream patch to check waitpid return values (testing as

possible fix for RHBZ#507066).
This commit is contained in:
Richard W.M. Jones 2009-06-20 15:07:36 +00:00
parent 87afda4422
commit 69d291b802
2 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,26 @@
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);

View File

@ -4,7 +4,7 @@
Summary: Access and modify virtual machine disk images Summary: Access and modify virtual machine disk images
Name: libguestfs Name: libguestfs
Version: 1.0.49 Version: 1.0.49
Release: 4%{?dist} Release: 5%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
URL: http://libguestfs.org/ URL: http://libguestfs.org/
@ -13,6 +13,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# Upstream: 3c5b447efd42b03c24104bdc1f3260e879bb1d25 # Upstream: 3c5b447efd42b03c24104bdc1f3260e879bb1d25
Patch0: guestfs-daemon-find.patch Patch0: guestfs-daemon-find.patch
# Upstream: 6654f617a6f720baa8f1ced89179e11679353d1e
Patch1: guestfs-daemon-waitpid.patch
# Basic build requirements: # Basic build requirements:
BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2man
@ -253,6 +255,7 @@ Requires: jpackage-utils
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
mkdir -p daemon/m4 mkdir -p daemon/m4
@ -498,10 +501,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Sat Jun 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-4 * Sat Jun 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-5
- Remove workaround for RHBZ#507007, since bug is now fixed. - Remove workaround for RHBZ#507007, since bug is now fixed.
- Pull in upstream patch to fix pclose checking - Pull in upstream patch to fix pclose checking
(testing as possible fix for RHBZ#507066). (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@redhat.com> - 1.0.49-2 * Fri Jun 19 2009 Richard W.M. Jones <rjones@redhat.com> - 1.0.49-2
- New upstream release 1.0.49. - New upstream release 1.0.49.