hush shell does exit i do a <ctrl> <c> in telnet
Denys Vlasenko
vda.linux at googlemail.com
Sun May 25 04:53:59 UTC 2008
On Saturday 24 May 2008 00:53, Martinb_ARM_NOMMU_KISSDVD wrote:
> > I did telnet to the box on port 2323 (telnet with the old lash shell)
> >
> > I did start strace and paste some console message when i did
> > start the 2e telnet (on port 23 with latest hush)
> > (its possible/likely my strace is buggy)
> >
> > /paste console
> > /hdd # strace -f -o strace.log -p 68
> > Process 68 attached - interrupt to quit
> > PANIC: setbpt for syscall 190 on 68???
> > Process 79 attached
> > Process 68 detached
> > Process 79 detached
> > /end paste console
> >
> > i did paste the strace.log (its small)
> >
> > /hdd # cat strace.log
> > 68 select(10, [4 5 6 7 8 9], NULL, NULL, NULL) = 1 (in [7])
> > 68 accept(7, 0, NULL) = 3
> > 68 rt_sigprocmask(SIG_BLOCK, [HUP ALRM CHLD], [], 8) = 0
> > 68 vfork() = 79
> > 68 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> > 68 close(3) = 0
> > 68 select(10, [4 5 6 7 8 9], NULL, NULL, NULL) = ?
> > ERESTARTNOHAND (To be restarted)
> > 68 --- SIGCHLD (Child exited) @ 0 (0) ---
> > 68 wait4(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG, NULL) = 79
> > 68 wait4(-1, 0x1573c58, WNOHANG, NULL) = 0
> > 68 sigreturn() = ? (mask now [])
> > 68 select(10, [4 5 6 7 8 9], NULL, NULL, NULL <unfinished ...>
It's not informative. It's lacking the information about syscalls
done by telnet and hush. I see only what inetd is doing, which is
not important.
Did you give -f switch to the strace? It will make strace to show children's
syscalls.
> > If i just attach to the inetd and exit (without a sleep and <ctr
> > c> ) i get
> >
> > /hdd # cat strace3.log
> > 68 select(10, [4 5 6 7 8 9], NULL, NULL, NULL) = 1 (in [7])
> > 68 accept(7, 0, NULL) = 3
> > 68 rt_sigprocmask(SIG_BLOCK, [HUP ALRM CHLD], [], 8) = 0
> > 68 vfork() = 87
> > 68 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> > 68 close(3) = 0
> > 68 select(10, [4 5 6 7 8 9], NULL, NULL, NULL <unfinished ...>
> > My config is attached
With your .config:
# ./busybox
BusyBox v1.11.0.svn (2008-05-25 06:38:43 CEST) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, echo, false, hush, sh, test, true
Well, your busybox doesn't have telnetd and inetd at all. You run some
other versions of these utilities. I cannot reproduce your situation.
> > > I set up a similar environment and it doesn't fail for me as
> > you describe.
> > > Perhaps the difference is in our .config files. Please send me yours.
> > >
> > > Also, it will be interesting to see the result of
> > >
> > > strace -f -o strace.log -p <inet'd pid>
> > >
> > > Start inetd first, then strace, then telnet into the box, run "sleep 10"
> > > and Ctrl-C it - telnetd will die as you describe (correct behavior
> > > is "only sleep dies, telnetd does not"). Then stop (Ctrl-C) strace
> > > and post the resulting strace.log
--
vda
More information about the busybox
mailing list