On 9/18/10 12:57 PM, Eric Blake (cygwin) wrote: > On 09/17/2010 06:37 PM, Chet Ramey wrote: >> I guess you could make a case to not reset $LINENO for the exit trap >> due to this sentence in Posix (though $LINENO is not Posix): > > LINENO may be optional in the bare minimum POSIX compliance, but it is > certainly specified
You're right. I guess the real question is what happens to LINENO when `eval' is executed. bash, ksh93, and zsh do different things, and dash doesn't support LINENO at all. Posix says that trap actions are processed as if executed by eval. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/