On Sat, 25 Sep 2010, Denys Vlasenko wrote:

> On Tuesday 14 September 2010 20:43, Cristian Ionescu-Idbohrn wrote:
> > On Tue, 14 Sep 2010, Denys Vlasenko wrote:
> >
> > > On Mon, Sep 13, 2010 at 11:52 PM, Cristian Ionescu-Idbohrn
> > > <[email protected]> wrote:
> > > > On Mon, 13 Sep 2010, Denys Vlasenko wrote:
> > > >
> > > >> On Sun, Sep 12, 2010 at 10:31 PM, Cristian Ionescu-Idbohrn
> > > >> <[email protected]> wrote:
> > > >> >> # Automatically generated make config: don't edit
> > > >> >> # Busybox version: 1.18.0.git
> > > >> >> # Sun Sep 12 18:25:22 2010
> > > >>
> > > >> No, I need the ENTIRE .config, not its header.
> > > >
> > > > Attached.
> > >
> > > It's
> > >
> > > CONFIG_FEATURE_SH_STANDALONE=y
> > > CONFIG_FEATURE_SH_NOFORK=y
> > >
> > > sleep is a nofork applet. It should not be. I am fixing this.
> > > Try attached patch.
> >
> > Alright.  Ash is "working" almost as expected.  The 'trap' is still run
> > twice on SIGINT, but behaves.  Hush, on the other side, seems to work as
> > expected, WRT skipping the second run (does only one run through the
> > signals).
>
> Please try attached patch.

Right.  The ash patch (already present on git HEAD) does the trick.  But I
do think you want to apply this patch (no code changes, just layout):

diff --git a/shell/ash.c b/shell/ash.c
index ea83552..54ee362 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12840,7 +12840,7 @@ init(void)
        /* bash re-enables SIGHUP which is SIG_IGNed on entry.
         * Try: "trap '' HUP; bash; echo RET" and type "kill -HUP $$"
         */
-        signal(SIGHUP, SIG_DFL);
+       signal(SIGHUP, SIG_DFL);

        /* from var.c: */
        {
@@ -13013,12 +13013,10 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
                if (e == EXERROR)
                        exitstatus = 2;
                s = state;
-               if (e == EXEXIT || s == 0 || iflag == 0 || shlvl) {
+               if (e == EXEXIT || s == 0 || iflag == 0 || shlvl)
                        exitshell();
-               }
-               if (e == EXINT) {
+               if (e == EXINT)
                        outcslow('\n', stderr);
-               }

                popstackmark(&smark);
                FORCE_INT_ON; /* enable interrupts */


Cheers,

-- 
Cristian
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to