Re: [PATCH] test-lib.sh: work around ksh's trap shortcomings
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 19, 2008, 07:39 UTC
- Message-ID
- <7v3al1h2rk.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <ZqhiQsjr6llIQS0q8PP8utINgu-mnafhFeUc119IDyjsaBEePvtv9g@cipher.nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 17 quoted lines
> Junio C Hamano wrote: >> Brandon Casey <casey@nrlssc.navy.mil> writes: >> >>> In ksh, if trap is called within a function with 0 or EXIT as its signal, >>> then the trap will be executed at the time the function returns. This >>> causes a problem in the test functions since 'trap - exit' is called >>> within the test_done function >> >> Your alias test_done that calls function test_done look ugly and confusing >> beyond words. > ... > I will try your suggestions. > > I also hope you noticed that these patches followed an FYI message > and were not meant for direct inclusion. I hope you noticed that > since I don't want you to waste your time. Maybe I should have > put FYI in the [PATCH] string.
Yeah, I think I got the subtle distinction between [PATCH FYI], [PATCH] and ones with and without sign-offs.
I've read "trap" section of 1003.1 2004 three times but I do not see the exact definition of "EXIT" condition mentioned. Is the behaviour to consider "function return" the EXIT condition considered a "shortcoming" (aka bug)?