View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000155tcshgeneralpublic2011-11-29 15:292012-01-16 03:36
ReporterAngelo Bonet 
Assigned ToChristos Zoulas 
PlatformOSOS Version
Product Version6.19.00 
Target VersionFixed in Version6.18.00 
Summary0000155: Please revert the behavior introduced as issue 0000110: Incorrect $status value of pipelined commands
DescriptionThe behavior introduced as part of issue 0000110 is major non-backward compatible csh/tcsh behavior change and it's going to break a lot of existing scripts if it's ever released.

Albeit there seems to be a contradiction between the documentation and the shell's behavior, csh/tcsh has been setting $status the same way for a long, long time (going all the way back csh on Solaris circa mid-1990's).

With that many years under its belt, the behavior should be considered correct -- and the documentation should be considered discrepant (not the other way around).

The $anyerror hook to opt-out of the new behavior is a nice thought, but even that's wrong: if anything, you should have to ask for the new behavior, not have to ask for the legacy behavior. On top of that, there's no single, global place I can set $anyerror and have it affect all of my "#!/bin/csh -f" scripts -- I have to individually modify each one.

My complaint here is not a theoretical one: Redhat has already released some tcsh RPMS with this new behavior and it's broken several of our tcsh infrastructure scripts. So I can tell you firsthand that this change is dangerous and will absolutely break existing scripts.

Unfortunately, Redhat is using the excuse that "upstream" has accepted their patch as part of their justification (along with some other craziness about tcsh needing to be POSIX-shell compliant - which is just plain wrong). So please revert this patch and avert the upcoming disaster that will ensue.

Additional InformationHere's an example of the kind of script that's been running on csh/tcsh correctly for years that will now break with this change:

#!/bin/csh -f
set location = `which notinstalled`
if ($? == 0) then
   echo "Great, required software is already installed here: $location"
   echo "You're missing required software, installing now..."

The change to $status will make this script think that "notinstalled" is actually installed already -- and it breaks.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-11-29 15:29 Angelo Bonet New Issue
2012-01-16 03:36 Christos Zoulas Status new => assigned
2012-01-16 03:36 Christos Zoulas Assigned To => Christos Zoulas
2012-01-16 03:36 Christos Zoulas Status assigned => resolved
2012-01-16 03:36 Christos Zoulas Fixed in Version => 6.18.00
2012-01-16 03:36 Christos Zoulas Resolution open => fixed

Copyright © 2000 - 2016 MantisBT Team
Powered by Mantis Bugtracker