From: Harald van Dijk <harald@gigawatt.nl>
To: Denys Vlasenko <vda.linux@googlemail.com>,
"Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: DASH shell mailing list <dash@vger.kernel.org>
Subject: Re: shell script error management in busybox ash
Date: Wed, 15 Sep 2021 20:59:00 +0100 [thread overview]
Message-ID: <4dfc717b-93dc-7e63-3ede-f8a8cd977413@gigawatt.nl> (raw)
In-Reply-To: <CAK1hOcOVuR4i0FgEOF1AdTA-EbdJyOTLNbViGxT0zwHceZGt-g@mail.gmail.com>
On 15/09/2021 20:47, Denys Vlasenko wrote:
> On Wed, Sep 15, 2021 at 7:48 PM Roberto A. Foglietta
> <roberto.foglietta@gmail.com> wrote:
>> Moreover,
>> the code that these exceptions trigger (everywhere the setjmp()
>> returns true) restores some values and frees some memory but the traps
>> need the information before the restore, not the restored values.
>
> Yes, _this_ is the problem we are having.
>
> E.g. $FUNCNAME in EXIT trap needs to be current function's name.
Important to also mention that although FUNCNAME is not part of POSIX,
and there is no spec to compare to, in bash and ksh it does not behave
that way, so you're talking about implementing FUNCNAME in a way that is
incompatible with existing shells. Which is fine if that is what you
want to do.
Cheers,
Harald van Dijk
next prev parent reply other threads:[~2021-09-15 20:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 17:47 shell script error management in busybox ash Roberto A. Foglietta
2021-09-15 19:47 ` Denys Vlasenko
2021-09-15 19:59 ` Harald van Dijk [this message]
2021-09-15 20:07 ` Denys Vlasenko
2021-09-15 20:16 ` Harald van Dijk
2021-09-15 20:22 ` Denys Vlasenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4dfc717b-93dc-7e63-3ede-f8a8cd977413@gigawatt.nl \
--to=harald@gigawatt.nl \
--cc=dash@vger.kernel.org \
--cc=roberto.foglietta@gmail.com \
--cc=vda.linux@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).