update "exit with stopped jobs" patch

Roberto A. Foglietta roberto.foglietta at gmail.com
Thu Aug 10 04:20:32 UTC 2023


Hi,

 I am checking the status of applying these patches in the 1.36.1 version:

-> https://github.com/robang74/tinycore-editor/tree/main/busybox/patches

In particular, I found this one where the first trunk has been applied
but not the second one. Even if the second one has been evaluated.

* https://github.com/robang74/tinycore-editor/blob/main/busybox/patches/busybox-1.33.1-exit-with-stopped-jobs.patch

In fact, the busybox code reports:

static int FAST_FUNC
exitcmd(int argc UNUSED_PARAM, char **argv)
{
    if (stoppedjobs())
        return 0;

    if (argv[1])
        savestatus = number(argv[1]);

//TODO: this script
// trap 'echo trap:$FUNCNAME' EXIT
// f() { exit; }
// f
//prints "trap:f" in bash. We can call exitshell() here to achieve this.
//For now, keeping dash code:
    raise_exception(EXEXIT);
    /* NOTREACHED */
}

Someone can update me on this part of the code, please?

IMHO, the question behind it is quite interesting because it relies on
the hope that in the future, dash and busybox ash source code will
merge in some way and keep aligned.

However, this will not happen if the two teams do not merge. First
people, then source code. Under this PoV dash could be a single applet
busybox executable.

I think that the two projects have quite different goals: busybox aims
for minimizing size rather than speed, while dash aims for speed.
Unfortunately, this dilemma cannot be solved by simply choosing -Os
rather than -O3 compilation flags. However, in some cases, a #define
set from .config can decide to privilege speed versus size.

Best regards, R-


More information about the busybox mailing list