[PATCH] shell script error management in ash (set of 6 patches)

Roberto A. Foglietta roberto.foglietta at gmail.com
Mon Aug 23 10:50:41 UTC 2021


Il giorno lun 23 ago 2021 alle ore 11:15 Harald van Dijk <harald at gigawatt.nl>
ha scritto:

> On 23/08/2021 10:09, Roberto A. Foglietta wrote:
> > Il giorno lun 23 ago 2021 alle ore 10:45 Harald van Dijk
> > <harald at gigawatt.nl <mailto:harald at gigawatt.nl>> ha scritto:
> >
> >     On 23/08/2021 09:16, Roberto A. Foglietta wrote:
>
> >   I did the same.
>
> You changed command eval false to false, but the 'command' builtin was
> the key element there, that is what made the syntax error non-fatal.
> 'command eval false' is not the same thing as simply 'false' (at least
> not in busybox ash).
>

Hi Harald, thanks to your deep knowledge of the shell we finally reached
the point!

The attached patch solves two questions/issues:

 - not exit exceptions disables trap ERR (solved)
 - not exit exceptions might do memory leak (not the case, verified)

 The full patch is here:

 https://github.com/robang74/tinycore-editor/tree/main/busybox/patches
 busybox-1.33.1-error-management-extension-for-ash-v016.patch

 Best regards,
-- 
Roberto A. Foglietta
+39.349.33.30.697
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20210823/ad64ea97/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-1.33.1-dealing-with-not-exit-exceptions.patch
Type: application/octet-stream
Size: 702 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20210823/ad64ea97/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsuite.tgz
Type: application/x-compressed
Size: 2974 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20210823/ad64ea97/attachment-0001.bin>


More information about the busybox mailing list