View Issue Details

IDProjectCategoryView StatusLast Update
0000282tcshGeneralpublic2022-04-23 12:21
Reporterkato Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
PlatformGNU/Linux x86_64OSOpen SuSE LeapOS Version15.3
Summary0000282: tcsh 6.20.00 : shell variable "anyerror" does not work as described in the tcsh man page
DescriptionIf "anyerror" is set, the exit status of a non-simple command should be non-zero if any subcommand fails. However, this does not hold in any case.
Steps To Reproduce/home/test> tcsh --version
tcsh 6.20.00 (Astron) 2016-11-24 (x86_64-unknown-linux) options wide,nls,lf,dl,al,kan,sm,color,filec
/home/test> cat non-existent-file|cat
cat: non-existent-file: No such file or directory
Exit 1
/home/test> set variable=`cat non-existent-file`
cat: non-existent-file: No such file or directory
Exit 1
/home/test> set variable=`cat non-existent-file|cat`
cat: non-existent-file: No such file or directory
/home/test> echo $?
0
TagsNo tags attached.

Activities

christos

2021-11-14 17:35

manager   ~0003676

set x=`cat /does/not/exist`
should set status to 1 and does not.

kato

2022-04-23 12:21

reporter   ~0003737

The bug persists with tcsh 6.24.00 with Open SuSE Leap 15.3:

/home/test> echo $version
tcsh 6.24.00 (Astron) 2022-02-02 (x86_64-suse-linux-suse-linux) options wide,nls,lf,dl,al,kan,sm,color,filec
/home/test> set anyerror
/home/test> set x=`cat /does/not/exist`
cat: /does/not/exist: No such file or directory
/home/test> echo $status
1
/home/test> set x=`cat /does/not/exist|less`
cat: /does/not/exist: No such file or directory
/home/test> echo $status
0

Issue History

Date Modified Username Field Change
2021-08-15 13:51 kato New Issue
2021-11-14 17:35 christos Assigned To => christos
2021-11-14 17:35 christos Status new => assigned
2021-11-14 17:35 christos Status assigned => confirmed
2021-11-14 17:35 christos Note Added: 0003676
2022-04-23 12:21 kato Note Added: 0003737