Hi all, the patch attached to this mail add the trap ERR feature. I tested it in various conditions and the following are the results:
roberto@vm-ubuntu18:~/tinycore-editor/busybox/src$ ./busybox ash -x ash: using fallback suid method ~/tinycore-editor/busybox/src $ trap "echo myerror; false" ERR; trap; false + trap 'echo myerror; false' ERR + trap trap -- 'echo myerror; false' ERR + false + echo myerror myerror + false ~/tinycore-editor/busybox/src $ trap -- ERR; false + trap -- ERR + false ~/tinycore-editor/busybox/src $ trap "echo myexit; false" EXIT; trap "echo myerror; false" ERR; exit 1 + trap 'echo myexit; false' EXIT + trap 'echo myerror; false' ERR + exit 1 + echo myexit myexit + false + echo myerror myerror + false -- Roberto A. Foglietta +39.349.33.30.697
busybox-1.33.1-enable-trap-ERR.patch
Description: Binary data
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
