I am building a custom Linux Image using Yocto Zeus (5.4 Kernel). On loading and checking the various functionalities of the Image, I am not able to exit some of the processes such as ping, tail -f in interactive mode. I am trying Ctrl+C but the shell does not seem to accept the interrupt even though I can see ^C^C in the terminal. As a result I have to either reload the box or run in non-interactive mode.
The same image when built in Yocto Thud (4.19 Kernel) is working fine.
Can anyone provide inputs on which code/config can be checked?
Edit1: The following is my stty -a output
rootuser:~# stty -a speed 9600 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; swtch = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^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
The intr is set to ^C yet not able to terminate.
I used Ping in non-interactive mode and tried to stop using Ctrl+c, but no luck
SIGINT
. The tty, if configured properly, sendsSIGINT
to the foreground process group, whereping
ortail
may be. Seeman 1 stty
where it mentionsintr
. Compare the output ofstty -a
. The shell can spawn a process (processes) in its own process group or in a separate one, and then it informs the terminal which group should be considered the foreground one. Read this. I cannot help you further, but now your research will not be biased by a false premise thatSIGINT
is relayed via the shell. – Kamil Maciorowski Sep 17 '20 at 06:27