Bug 244596 - mock-0.7.1 fails to get child process return value
mock-0.7.1 fails to get child process return value
Status: CLOSED ERRATA
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
unspecified
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Michael E Brown
:
: 246614 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-17 18:01 EDT by Fabrice Bellet
Modified: 2013-01-09 23:21 EST (History)
4 users (show)

See Also:
Fixed In Version: 0.7.4-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-02 22:41:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fabrice Bellet 2007-06-17 18:01:38 EDT
The problem occurs in mock-0.7.1 on Fedora 7, in the do() method. It seems to me
that the return status of the child process created by popen2.Popen4() is never
assigned to retval before exiting. So default value zero is always returned to
the parent process, and the consequence is that build errors are ignored by
mock. Here is a patch that makes it work for me:

--- /usr/bin/mock       2007-06-14 19:42:22.000000000 +0200
+++ /tmp/mock   2007-06-17 23:30:46.000000000 +0200
@@ -606,6 +606,9 @@
             for line in child.fromchild:
                 w.write(line)
             w.close()
+
+            retval = child.wait()
+
             os._exit( (retval & 0xFF00) >> 8 )
Comment 1 Jeff Sheltren 2007-07-18 08:46:33 EDT
*** Bug 246614 has been marked as a duplicate of this bug. ***
Comment 2 Michael E Brown 2007-07-18 14:13:01 EDT
patch accepted for 0.7.4
Thanks
Comment 3 Fedora Update System 2007-07-18 16:54:47 EDT
mock-0.7.4-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2007-08-02 22:41:19 EDT
mock-0.7.4-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.