Bug 244596
| Summary: | mock-0.7.1 fails to get child process return value | ||
|---|---|---|---|
| Product: | [Retired] Fedora Hosted Projects | Reporter: | Fabrice Bellet <fabrice> |
| Component: | mock | Assignee: | Michael E Brown <mebrown> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | dcantrell, fabrice, herrold, sheltren |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 0.7.4-1.fc7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2007-08-03 02:41:26 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
*** Bug 246614 has been marked as a duplicate of this bug. *** patch accepted for 0.7.4 Thanks 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. 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. |
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 )