This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bash traps - while emitting ERR trap


On Wed, Jul 30, 2003 at 12:15:07PM -0700, Andrew DeFaria wrote:
>Given the following script:
>
>#!/bin/bash
>function cleanup {    echo "ENTER cleanup"
>} # cleanup
>                  trap cleanup EXIT ERR
>           declare -i i=4           echo "Entering while loop"
>while [ $i -gt 0 ]; do
>echo "In while loop"
>let i=i-1
>done                   echo "After trap is set"
>Why is "ENTER cleanup" echoed twice when run?

This is really not a cygwin question.

If you think this is a bug then you can send email to
bug-bash-AT-gnu-PERIOD-org .

Otherwise, the usenet newsgroup comp.unix.shell may be able to help.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]