| Summary: | A Pipe returns unexpected exit code. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Dimitar Yordanov <dyordano> |
| Component: | bash | Assignee: | Roman Rakus <rrakus> |
| Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.1 | CC: | prc, tsmetana |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-11-30 13:33:20 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Dimitar Yordanov
2011-11-28 12:39:44 UTC
Didn't you interchange Actual and Expected behaviour? Both cases (2 and 3) should return 0 exit codes. (In reply to comment #1) > Didn't you interchange Actual and Expected behaviour? Both cases (2 and 3) > should return 0 exit codes. Yes, you are absolutely correct. Actual and Expected behavior are interchanged. I can't reproduce it; RHEL6: [root@localhost ~]# rpm -q bash coreutils bash-4.1.2-8.el6.x86_64 coreutils-8.4-13.el6.x86_64 [root@localhost ~]# set -o pipefail [root@localhost ~]# cat /var/log/messages | head -n 111111 > /dev/null; echo $? 0 [root@localhost ~]# cat /var/log/messages | head -n 1 > /dev/null; echo $? 0 RHEL5: [root@localhost ~]# rpm -q bash coreutils bash-3.2-32.el5 coreutils-5.97-34.el5 [root@localhost ~]# set -o pipefail [root@localhost ~]# cat /var/log/messages | head -n 111111 > /dev/null; echo $? 0 [root@localhost ~]# cat /var/log/messages | head -n 1 > /dev/null; echo $? 0 |