Ctrl-C doesn't work in the shell

Chan Kim ckim at etri.re.kr
Tue Apr 8 21:22:07 EDT 2014


Ah, of coursee Ctrl-C works on the console and LCD shells. I set the Job-Constrol option in the busybox shell options.
________________________________
From : "Chan Kim" <ckim at etri.re.kr>
Sent : 2014-04-09 10:03:10 ( +09:00 )
To : Valdis.Kletnieks at vt.edu <Valdis.Kletnieks at vt.edu>
Cc : kernelnewbies at kernelnewbies.org <kernelnewbies at kernelnewbies.org>
Subject : RE: Ctrl-C doesn't work in the shell


Hi, Valids and others
I saw the email replies only yesterday afternoon. Reading those and other internet posts, reallized my shell on the LCD is working as a console.
(When I type tty, it responds with 'console'). So I set the boot argument 'console'  back to ttyS (serial port) and removed the etc/inittab so that default inittab will take effect. Default inittab starts shell on tty2, tty3 and tty4. And I ran it and vola! the console is in the UART terminal and I could switch to different shell windows by pressing Alt-F2, Alt-F3 and Alt-F4.  I now have console on the UART terminal and 3 shells on the LCD which I can switch between.
Thanks all for good suggestions (not only this Ctrl-C but others like printf system call source location..).
Best regards,
Chan

________________________________
From : "Valdis.Kletnieks at vt.edu" <Valdis.Kletnieks at vt.edu>
Sent : 2014-04-01 23:13:49 ( +09:00 )
To : Chan Kim <ckim at etri.re.kr>
Cc : kernelnewbies at kernelnewbies.org <kernelnewbies at kernelnewbies.org>
Subject : Re: Ctrl-C doesn't work in the shell

On Tue, 01 Apr 2014 05:57:05 -0000, Chan Kim said:
> When I'm on a sheel on LCD using USB keyboard, all works fine (except another
> important problem..) but Ctrl-C key doesn't work.
> When I press ctrl-C, '^C' is displayed on the screen (prompt line), but
> doesn't have the effect of killing the job. For example, I start ping and it
> displays the response every second, but even if I press Ctrl-C, it contiues
> pinging. What should I do?

This often happens if you've managed to launch a shell that doesn't set itself
up as "interactive" and/or acquire a control terminal.

Quick test - if you do a 'ps', does the shell process show up with a ? or with
a tty? If it shows ?, it hasn't gotten a control terminal.

Your shell may have a '-i' flag to make it interactive and/or a '-l' to
make it be a login shell, those flags may be an easy way to fix the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140409/f2d7639c/attachment.html 


More information about the Kernelnewbies mailing list