I customized the root file system using Busybox
, and its version is 1.36.1
. I don't know why my device cannot be terminated by ctrl+c
when typing ping
an IP on the monitor keyboard. However, when I connect to the device through SSH, the ping
an IP can be terminated by ctrl+c
? The same goes for ctrl+u
.
I referred to similar problems, but did not solve my problem.
By the way, my system does not have a desktop environment. My processor is Intel x86_64 bit.
#1 #stty -a (SSH connection)
speed 38400 baud; rows 41; columns 143; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
#stty -a (monitor keyboard)
speed 38400 baud; rows 37; columns 100; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff
-iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc
#2 #cat /etc/inittab (old)
::sysinit:/etc/init.d/rcS
::respawn:-/bin/sh
::ctrlaltdel:/bin/umount -a -r
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a
#cat /etc/inittab (new)
::sysinit:/etc/init.d/rcS
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6
::ctrlaltdel:/bin/umount -a -r
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a
#3 #echo $SHELL (SSH connection)
/bin/bash
#echo $SHELL (monitor keyboard)
/bin/sh
#4 #echo $TERM (SSH connection)
xterm
#echo $TERM (monitor keyboard)
xterm
#5 #tty (SSH connection)
/dev/pts/0
#tty (monitor keyboard)
/dev/console
#6 #ls -l /dev/console /dev/tty[0-9]
crw-rw---- 1 root root 5, 1 Jan 4 04:31 /dev/console
crw-rw---- 1 root root 4, 0 Jan 4 04:31 /dev/tty0
crw-rw---- 1 root root 4, 1 Jan 4 04:32 /dev/tty1
crw-rw---- 1 root root 4, 2 Jan 4 04:31 /dev/tty2
crw-rw---- 1 root root 4, 3 Jan 4 04:31 /dev/tty3
crw-rw---- 1 root root 4, 4 Jan 4 04:31 /dev/tty4
crw-rw---- 1 root root 4, 5 Jan 4 04:31 /dev/tty5
crw-rw---- 1 root root 4, 6 Jan 4 04:31 /dev/tty6
crw-rw---- 1 root root 4, 7 Jan 4 04:31 /dev/tty7
crw-rw---- 1 root root 4, 8 Jan 4 04:31 /dev/tty8
crw-rw---- 1 root root 4, 9 Jan 4 04:31 /dev/tty9
TERM
environment variable and so on? Lastly, if it was compiled from source, Busybox can be configured quite extensively during compilation. – Vilinkameni Jan 31 '24 at 10:25ping
is a linux command,ping an IP
means that the IP can be any. – Vimer Jan 31 '24 at 11:16stty -a
output from the SSH connection or from the session on monitor keyboard? Trystty -a
on both, and see if there are any differences. In particular, check thatintr = ^C
is listed in both cases. – telcoM Jan 31 '24 at 11:17stty -a
obtained from the screen, but they all haveintr = ^C
. – Vimer Jan 31 '24 at 11:26