Bug 244596 - mock-0.7.1 fails to get child process return value
Summary: mock-0.7.1 fails to get child process return value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock
Version: unspecified
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michael E Brown
QA Contact:
URL:
Whiteboard:
: 246614 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-17 22:01 UTC by Fabrice Bellet
Modified: 2013-01-10 04:21 UTC (History)
4 users (show)

Fixed In Version: 0.7.4-1.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-03 02:41:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Fabrice Bellet 2007-06-17 22:01:38 UTC
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 12:46:33 UTC
*** Bug 246614 has been marked as a duplicate of this bug. ***

Comment 2 Michael E Brown 2007-07-18 18:13:01 UTC
patch accepted for 0.7.4
Thanks

Comment 3 Fedora Update System 2007-07-18 20:54:47 UTC
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-03 02:41:19 UTC
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.