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, and I see no reason why bash should not fully
comply with the User Portability Utilities option (which also includes
things like fc, that bash also supports):
http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03
LINENO
Set by the shell to a decimal number representing the current
sequential line number (numbered starting with 1) within a script or
function before it executes each command. If the user unsets or resets
LINENO , the variable may lose its special meaning for the life of the
shell. If the shell is not currently executing a script or function, the
value of LINENO is unspecified. This volume of POSIX.1-2008 specifies
the effects of the variable only for systems supporting the User
Portability Utilities option.
--
Eric Blake
volunteer cygwin package maintainer
CYGWIN-ANNOUNCE UNSUBSCRIBE INFO:
=================================
To unsubscribe to the cygwin-announce mailing list, look at the
"List-Unsubscribe: " tag in the email header of this message. Send email
to the address specified there. It will be in the format:
cygwin-announce-unsubscribe-you=yourdomain....@cygwin.com
If you need more information on unsubscribing, start reading here:
http://sourceware.org/lists.html#unsubscribe-simple
Please read *all* of the information on unsubscribing that is available
starting at this URL.