| Anonymous | Login | Signup for a new account | 2013-05-20 16:40 UTC | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0000110 | tcsh | general | public | 2010-12-02 11:37 | 2011-04-14 18:24 | ||||
| Reporter | Vojtech Vitek (V-Teq) | ||||||||
| Assigned To | Christos Zoulas | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | 6.17.00 | ||||||||
| Target Version | Fixed in Version | HEAD | |||||||
| Summary | 0000110: [PATCH] Incorrect $status value of pipelined commands | ||||||||
| Description | The tcsh documentation states that the $status (or $?) variables hold the return value of the last command. Therefore in case of pipelines it should be the last command of the pipeline. This doesn't work properly. There are two examples: 1) $ cat /notfound | wc -l cat: /notfound: No such file or directory 0 $ echo $? 1 <------- should be 0 (the last command - wc - was successful) 2) $ echo `cat /notfound` cat: /notfound: No such file or directory $ echo $? 1 <------- should be 0 (echo was successful) This bug was originally reported in https://bugzilla.redhat.com/show_bug.cgi?id=638955 [^] I'm attaching a patch by Tomas Smetana <tsmetana AT redhat.com>. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
Notes |
|
|
(0000157) Christos Zoulas (manager) 2011-01-17 19:20 |
revision 3.115 date: 2011/01/17 16:18:26; author: christos; state: Exp; lines: +6 -2 PR/110: exit status should be the status of the last command in a pipeline so ignore previous statuses from the pipeline stages. |
|
(0000166) Christos Zoulas (manager) 2011-01-19 02:36 |
The patch is wrong; it breaks the unit-tests and has been reverted. |
|
(0000172) Vojtech Vitek (V-Teq) (reporter) 2011-04-14 09:33 edited on: 2011-04-14 09:39 |
Here are another two patches that should fix 1) the reported issue 2) "The patch is wrong; it breaks the unit-tests and has been reverted." The first patch =============== Fixes 'exit { false }' regression of the original patch. |
|
(0000173) Vojtech Vitek (V-Teq) (reporter) 2011-04-14 09:37 |
The second patch ================ Fixes the testsuite which is actually wrong. |
|
(0000174) Christos Zoulas (manager) 2011-04-14 18:24 |
applied to head, and added $anyerror to reproduce the old behavior. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-12-02 11:37 | Vojtech Vitek (V-Teq) | New Issue | |
| 2010-12-02 11:37 | Vojtech Vitek (V-Teq) | File Added: tcsh-6.14.00-pipeexit.patch | |
| 2011-01-17 19:20 | Christos Zoulas | Status | new => resolved |
| 2011-01-17 19:20 | Christos Zoulas | Fixed in Version | => HEAD |
| 2011-01-17 19:20 | Christos Zoulas | Resolution | open => fixed |
| 2011-01-17 19:20 | Christos Zoulas | Assigned To | => Christos Zoulas |
| 2011-01-17 19:20 | Christos Zoulas | Note Added: 0000157 | |
| 2011-01-19 02:35 | Christos Zoulas | Assigned To | Christos Zoulas => |
| 2011-01-19 02:36 | Christos Zoulas | Note Added: 0000166 | |
| 2011-01-19 02:36 | Christos Zoulas | Assigned To | => Christos Zoulas |
| 2011-01-19 02:36 | Christos Zoulas | Status | resolved => acknowledged |
| 2011-04-14 09:33 | Vojtech Vitek (V-Teq) | Note Added: 0000172 | |
| 2011-04-14 09:34 | Vojtech Vitek (V-Teq) | File Added: tcsh-6.17.00-pipe-exit-status.patch | |
| 2011-04-14 09:37 | Vojtech Vitek (V-Teq) | Note Added: 0000173 | |
| 2011-04-14 09:38 | Vojtech Vitek (V-Teq) | File Added: tcsh-6.17.00-testsuite.patch | |
| 2011-04-14 09:39 | Vojtech Vitek (V-Teq) | Note Edited: 0000172 | |
| 2011-04-14 18:24 | Christos Zoulas | Status | acknowledged => closed |
| 2011-04-14 18:24 | Christos Zoulas | Note Added: 0000174 | |
| Copyright © 2000 - 2012 MantisBT Group |