www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/30/15:41:09

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 30 Jul 2003 15:40:44 -0400
From: Christopher Faylor <cgf-idd AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bash traps - while emitting ERR trap
Message-ID: <20030730194044.GA12537@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <bg95fj$tml$1 AT main DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <bg95fj$tml$1@main.gmane.org>
User-Agent: Mutt/1.4.1i

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 AT sourceware DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019