[BusyBox] ash - signal handling problem?

Jean Wolter jw5 at os.inf.tu-dresden.de
Sat Jan 31 19:42:53 UTC 2004


Jean Wolter <jw5 at os.inf.tu-dresden.de> writes:

> "Vladimir N. Oleynik" <dzo at simtreas.ru> writes:

> > >     2. If I log into a machine via ssh and the ssh client is killed
> > >     via kill -9 ash ends up in a loop raising SIGINT and ignoring it
> > >     afterwards (ash ignored the hup signal because it was set to
> > >     ignore via trap "" 1).
> > 
> > Its old problem ash.
> > I could look this problem, but it will create additional complexities
> > on synchronization with the original version.
> > 
> > Can be will better if you will consult with the original author:
> > Herbert Hu?
> 
> I will try to fetch a current version of dash and check whether it has
> the same problem.

I tried to reproduce the situation with dash and it doesn't show this
behaviour. I logged into the machine, replaced busybox ash with dash
using "exec sh" (sh beeing dash 0.4.21) and killed the ssh client with
-9. dash terminated correctly.

The main difference as far as I understand the code is that

    - dash passes the error all the way up to the main function
    converting it to a normal end of file on the way; it terminates
    normally somwhere at the top of the calling chain.

    - busybox ash raises an "exception" instead of passing the error
    up to the calling functions. The raised exception isn't handled
    correctly and leads to an endless loop.

So I think it is a special problem of bb ash.

regards,
Jean



More information about the busybox mailing list