A stopped job make ash ignores exit
Roberto A. Foglietta
roberto.foglietta at gmail.com
Sun Sep 12 08:26:52 UTC 2021
Il giorno dom 12 set 2021 alle ore 09:15 Ron Yorston <rmy at pobox.com> ha scritto:
>
> Roberto A. Foglietta wrote:
> > I found a case in which IMHO the ash does not behave as expected by a shell.
> > When there is a stopped job the exit command is ignored but it should not.
> > At least bash does not ignore the exit if a stopped job exists.
>
> Warning about stopped jobs is OK in an interactive shell. Bash does
> that too. The difference is that BusyBox ash (and dash) issues the
> warning in a non-interactive shell, which it probably shouldn't do.
>
> Possible alternative fix below.
Hi Ron,
IMHO this line
> + if (iflag || job_warning)
> goto out;
should be modified in this way
> + if (!iflag || job_warning)
> goto out;
Non-interactive shells should not care about stopped jobs but
interactive shells do as you said.
Is that right?
--
Roberto A. Foglietta
+39.349.33.30.697
More information about the busybox
mailing list