Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [Patch] trap: exit: invalid signal specification

From: Matthias Lederhofer <hidden>
Date: 2016-06-15 22:42:31

As an example bash (v. 3.1.17) permits lowercase signal names but it converts 
this lowercase signal names into uppercase ones while interpreting the 
script. But for our "Turkish has 4 letter "I"s" problem this convert to 
uppercase one process fails but for bash invalid signal names not be 
considered a syntax error and do not cause the shell to abort. 
It is ``trap <action> <signal>'' so for the signal part this may be
right that this is made uppercase. But action is not modified I guess.
So it should be exit because there is no built-in named EXIT in
bash:

$ type exit
exit is a shell builtin
$ type EXIT
bash: type: EXIT: not found

So for me it does not seem to work:

$ trap 'err=$?; echo trap; EXIT $?' 0
$ exit 5
exit
trap
bash: EXIT: command not found
[1]    12906 exit 5     bash
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help