[Bug 4472] busybox tail -f does not terminate with SIGINT (Ctrl+c) via telnet

bugzilla at busybox.net bugzilla at busybox.net
Sat Nov 19 21:59:34 UTC 2011


https://bugs.busybox.net/show_bug.cgi?id=4472

--- Comment #2 from Denys Vlasenko <vda.linux at googlemail.com> 2011-11-19 21:59:34 UTC ---
(In reply to comment #0)
> If tail -f <filename> is used on busybox 1.16.0 in a telnet session, then you
> want to stop it using ctrl+c it does not work.

Does Ctrl-C work for other applets started in the telnet session, such as bare
"cat" from shell prompt?

> (Ctrl+c does work if using
> UART console, and ctrl+c does work when using less in telnet to prove that my
> telnet client is configured correctly).

busybox's less installs SIGINT handler. Therefore, it might be unaffected by
bad SIG_IGN.

(In reply to comment #1)
> Was able to add a work around to networking/telnetd.c in function
> make_new_session()
> 
> Addition of
>     signal(SIGINT, SIG_DFL);
> 
> near line 330 seems to work.

If this helps, it means that SIGINT is set to SIG_IGN. Can you verify this by
using this line instead?

      bb_error_msg("Prev INT handler:%p", signal(SIGINT, SIG_DFL));

If it will print "1", then the setting was SIG_IGN indeed.
If this is the case, we need to figure out where it was set.

telnetd does not change SIGINT handling. (Please check it with strace to be
sure). It must be its parent process then. Where do you launch telnetd from?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list