[PATCH 0/3] ash: ignoreeof and interactive vs. non-interactive shells

Denys Vlasenko vda.linux at googlemail.com
Tue Sep 14 06:39:11 UTC 2021


Applied, thank you.

Patch #3 can have fewer nesting:

                        if (!top || numeof >= 50)
                                break;
                        if (!stoppedjobs()) {
+                               if (!iflag)
+                                       break;
                                if (!Iflag) {
-                                       if (iflag) {
-                                               newline_and_flush(stderr);
-                                       }
+                                       newline_and_flush(stderr);
                                        break;
                                }
                                out2str("\nUse \"exit\" to leave shell.\n");
                        }


On Sun, Sep 12, 2021 at 12:20 PM Ron Yorston <rmy at pobox.com> wrote:
>
> I was holding back my fix for ignoreeof (broken since 2008!) to see
> what upstream dash thought about my changes to EOF handling.
>
> However, it's required to address the problem with stopped jobs
> preventing non-interactive shells from exiting, so here it is.
>
> I've also pulled in a patch from Harald van Dijk's ash derivative
> which handles a similar situation with non-interactive shells when
> ignoreeof is set.
>
> Ron
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list