[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Second trap invocation is ignored?
From: |
Scott Bronson |
Subject: |
Re: Second trap invocation is ignored? |
Date: |
Mon, 6 Apr 2015 08:11:59 -0700 |
On Mon, Apr 6, 2015 at 8:04 AM, Eduardo A. Bustamante López
<dualbus@gmail.com> wrote:
> There is no bug. Simply, your expectations on when the DEBUG trap runs are
> wrong.
>
> The `script2' I provided ran with set -T is the closest you'll get to what you
> expect, but, since DEBUG runs *before* the source command, it'll not work as
> you want.
True, but that doesn't explain why the first sourced invocation
succeeds, but all
invocations thereafter fail.
Is there a reason for this behavior? Why should a call to trap succeed or fail
depending on whether the trap is already set or not? If that's
expected behavior,
I would certainly like to document it!
Thanks,
- Scott
- Second trap invocation is ignored?, Scott Bronson, 2015/04/05
- Re: Second trap invocation is ignored?, Greg Wooledge, 2015/04/06
- Re: Second trap invocation is ignored?, Eduardo A . Bustamante López, 2015/04/06
- Re: Second trap invocation is ignored?, Scott Bronson, 2015/04/06
- Re: Second trap invocation is ignored?, Eduardo A . Bustamante López, 2015/04/06
- Re: Second trap invocation is ignored?, Greg Wooledge, 2015/04/06
- Re: Second trap invocation is ignored?,
Scott Bronson <=
- Re: Second trap invocation is ignored?, Eduardo A . Bustamante López, 2015/04/06
- Re: Second trap invocation is ignored?, Greg Wooledge, 2015/04/06
- Re: Second trap invocation is ignored?, Chet Ramey, 2015/04/10
- Re: Second trap invocation is ignored?, Scott Bronson, 2015/04/10
- Re: Second trap invocation is ignored?, Chet Ramey, 2015/04/11
Re: Second trap invocation is ignored?, Scott Bronson, 2015/04/06
Re: Second trap invocation is ignored?, Chet Ramey, 2015/04/10