public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* "ctrl+c" disabled!
@ 2003-08-21 12:30 Bill J.Xu
  2003-08-21 12:46 ` Richard B. Johnson
  2003-08-22  2:04 ` Edgar Toernig
  0 siblings, 2 replies; 13+ messages in thread
From: Bill J.Xu @ 2003-08-21 12:30 UTC (permalink / raw)
  To: linux-kernel

hello everyone,

when I connect linux through serial port,and run a program such as "ping xxx.xxx.xxx.xxx",then I can not stop it by using "ctrl+c".and the only way is to telnet it,and kill that progress

why?

thanks

Bill J.Xu

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-21 12:30 "ctrl+c" disabled! Bill J.Xu
@ 2003-08-21 12:46 ` Richard B. Johnson
  2003-08-22  1:50   ` Bill J.Xu
  2003-08-22  2:04 ` Edgar Toernig
  1 sibling, 1 reply; 13+ messages in thread
From: Richard B. Johnson @ 2003-08-21 12:46 UTC (permalink / raw)
  To: Bill J.Xu; +Cc: linux-kernel

On Thu, 21 Aug 2003, Bill J.Xu wrote:

> hello everyone,
>
> when I connect linux through serial port,and run a program such as "ping xxx.xxx.xxx.xxx",then I can not stop it by using "ctrl+c".and the only way is to telnet it,and kill that progress
>
> why?
>
> thanks
>
> Bill J.Xu
> -
How do you 'connect' through the serial port? You need to use a
serial `getty` that properly sets up the terminal. The 'mini-getty'
used on recent distributions doesn't bother.
Also, if you are not using a real terminal, you need to use a terminal
program that actually sends a ^C.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-21 12:46 ` Richard B. Johnson
@ 2003-08-22  1:50   ` Bill J.Xu
  2003-08-22 13:16     ` Richard B. Johnson
  0 siblings, 1 reply; 13+ messages in thread
From: Bill J.Xu @ 2003-08-22  1:50 UTC (permalink / raw)
  To: root; +Cc: linux-kernel

I use the serial line to connect my computer with linux box, and I use the SecureCRT.
The following is the corresponding configuration of linux box' inittab file.

# Serial lines
s1:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
s2:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

Thank you, dear Dick Johnson


Bill


----- Original Message ----- 
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: "Bill J.Xu" <xujz@neusoft.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Thursday, August 21, 2003 8:46 PM
Subject: Re: "ctrl+c" disabled!


> On Thu, 21 Aug 2003, Bill J.Xu wrote:
> 
> > hello everyone,
> >
> > when I connect linux through serial port,and run a program such as "ping xxx.xxx.xxx.xxx",then I can not stop it by using "ctrl+c".and the only way is to telnet it,and kill that progress
> >
> > why?
> >
> > thanks
> >
> > Bill J.Xu
> > -
> How do you 'connect' through the serial port? You need to use a
> serial `getty` that properly sets up the terminal. The 'mini-getty'
> used on recent distributions doesn't bother.
> Also, if you are not using a real terminal, you need to use a terminal
> program that actually sends a ^C.
> 
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
>             Note 96.31% of all statistics are fiction.
> 
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-21 12:30 "ctrl+c" disabled! Bill J.Xu
  2003-08-21 12:46 ` Richard B. Johnson
@ 2003-08-22  2:04 ` Edgar Toernig
  2003-08-22  2:12   ` Bill J.Xu
  1 sibling, 1 reply; 13+ messages in thread
From: Edgar Toernig @ 2003-08-22  2:04 UTC (permalink / raw)
  To: Bill J.Xu; +Cc: linux-kernel

"Bill J.Xu" wrote:
>
> when I connect linux through serial port,and run a program such
> as "ping xxx.xxx.xxx.xxx",then I can not stop it by using "ctrl+c".
> and the only way is to telnet it,and kill that progress
> 
> why?

Try:

  stty -a

and check the intr setting.  Maybe it's set to DEL (^?).
You can correct it with:

  stty intr "^c"

Ciao, ET.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  2:04 ` Edgar Toernig
@ 2003-08-22  2:12   ` Bill J.Xu
  2003-08-22  2:42     ` Edgar Toernig
  0 siblings, 1 reply; 13+ messages in thread
From: Bill J.Xu @ 2003-08-22  2:12 UTC (permalink / raw)
  To: Edgar Toernig; +Cc: linux-kernel

The following is the stty' result, I think it's right
----------------------------------------------------------------------------------
bash-2.05# stty -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^X; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^U; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany -imaxbel
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
----------------------------------------------------------------------------------
but  ^C is bad

----- Original Message ----- 
From: "Edgar Toernig" <froese@gmx.de>
To: "Bill J.Xu" <xujz@neusoft.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Friday, August 22, 2003 10:04 AM
Subject: Re: "ctrl+c" disabled!


> "Bill J.Xu" wrote:
> >
> > when I connect linux through serial port,and run a program such
> > as "ping xxx.xxx.xxx.xxx",then I can not stop it by using "ctrl+c".
> > and the only way is to telnet it,and kill that progress
> > 
> > why?
> 
> Try:
> 
>   stty -a
> 
> and check the intr setting.  Maybe it's set to DEL (^?).
> You can correct it with:
> 
>   stty intr "^c"
> 
> Ciao, ET.
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  2:12   ` Bill J.Xu
@ 2003-08-22  2:42     ` Edgar Toernig
  2003-08-22  3:22       ` Bill J.Xu
  0 siblings, 1 reply; 13+ messages in thread
From: Edgar Toernig @ 2003-08-22  2:42 UTC (permalink / raw)
  To: Bill J.Xu; +Cc: linux-kernel

"Bill J.Xu" wrote:
> 
> The following is the stty' result, I think it's right
> ----------------------------------------------------------------------------------
> bash-2.05# stty -a
> speed 9600 baud; rows 0; columns 0; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^X; eof = ^D; eol = <undef>;
> eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
> lnext = ^V; flush = ^U; min = 1; time = 0;
> -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
> -ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
> -iuclc ixany -imaxbel
> 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
> ----------------------------------------------------------------------------------
> but  ^C is bad

Hmm... looks fine.  intr set to ^C and isig enabled.  Maybe you should check what
the terminal program is actually sending:

  od -tx1

Then type Ctrl-C Ctrl-D.  Should print "00000000 03".

How do you kill the process from telnet?  kill -9 <pid> or kill -2 <pid>?
Maybe sigint is ignored (possible if bash was started with ignored sigint -
broken/strange getty).  Is job control (^Z/fg) working?

Ciao, ET.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  2:42     ` Edgar Toernig
@ 2003-08-22  3:22       ` Bill J.Xu
  2003-08-22  4:14         ` Charles Lepple
  2003-08-22 13:22         ` Edgar Toernig
  0 siblings, 2 replies; 13+ messages in thread
From: Bill J.Xu @ 2003-08-22  3:22 UTC (permalink / raw)
  To: Edgar Toernig; +Cc: linux-kernel

after run od -tx1, the following is the result
------------------------------------------------
bash-2.05# ./od -tx1
0000000
------------------------------------------------
and I use "killall xxx_appname" to kill the progress after telnet the linux box.




----- Original Message ----- 
From: "Edgar Toernig" <froese@gmx.de>
To: "Bill J.Xu" <xujz@neusoft.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Friday, August 22, 2003 10:42 AM
Subject: Re: "ctrl+c" disabled!


> "Bill J.Xu" wrote:
> > 
> > The following is the stty' result, I think it's right
> > ----------------------------------------------------------------------------------
> > bash-2.05# stty -a
> > speed 9600 baud; rows 0; columns 0; line = 0;
> > intr = ^C; quit = ^\; erase = ^?; kill = ^X; eof = ^D; eol = <undef>;
> > eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
> > lnext = ^V; flush = ^U; min = 1; time = 0;
> > -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
> > -ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
> > -iuclc ixany -imaxbel
> > 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
> > ----------------------------------------------------------------------------------
> > but  ^C is bad
> 
> Hmm... looks fine.  intr set to ^C and isig enabled.  Maybe you should check what
> the terminal program is actually sending:
> 
>   od -tx1
> 
> Then type Ctrl-C Ctrl-D.  Should print "00000000 03".
> 
> How do you kill the process from telnet?  kill -9 <pid> or kill -2 <pid>?
> Maybe sigint is ignored (possible if bash was started with ignored sigint -
> broken/strange getty).  Is job control (^Z/fg) working?
> 
> Ciao, ET.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  3:22       ` Bill J.Xu
@ 2003-08-22  4:14         ` Charles Lepple
  2003-08-22  4:55           ` Bill J.Xu
  2003-08-22 13:22         ` Edgar Toernig
  1 sibling, 1 reply; 13+ messages in thread
From: Charles Lepple @ 2003-08-22  4:14 UTC (permalink / raw)
  To: linux-kernel

Bill J.Xu wrote:
> after run od -tx1, the following is the result
> ------------------------------------------------
> bash-2.05# ./od -tx1
> 0000000

That's after you pressed ^C in your terminal program? What you have 
there shows that od has not received any characters.

Pick another control character, and use 'stty intr' to set that as your 
interrupt character. I don't have any experience with SecureCRT, but it 
may use ^C to implement the Windows Edit->Copy function.

-- 
Charles Lepple <ghz.cc!clepple>



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  4:14         ` Charles Lepple
@ 2003-08-22  4:55           ` Bill J.Xu
  2003-08-22 11:27             ` Russell King
  0 siblings, 1 reply; 13+ messages in thread
From: Bill J.Xu @ 2003-08-22  4:55 UTC (permalink / raw)
  To: Charles Lepple, linux-kernel

Yeah,that is the result after pressing ctrl+c, ctrl+d. maybe od do not get the "ctrl+c" signal.
But I use SecureCRT with the same configration at the same PC to telnet the linux box,everything is OK.
So I think that if there is some thing wrong with linux kernel?

Bill

----- Original Message ----- 
From: "Charles Lepple" <clepple@ghz.cc>
To: <linux-kernel@vger.kernel.org>
Sent: Friday, August 22, 2003 12:14 PM
Subject: Re: "ctrl+c" disabled!


> Bill J.Xu wrote:
> > after run od -tx1, the following is the result
> > ------------------------------------------------
> > bash-2.05# ./od -tx1
> > 0000000
> 
> That's after you pressed ^C in your terminal program? What you have 
> there shows that od has not received any characters.
> 
> Pick another control character, and use 'stty intr' to set that as your 
> interrupt character. I don't have any experience with SecureCRT, but it 
> may use ^C to implement the Windows Edit->Copy function.
> 
> -- 
> Charles Lepple <ghz.cc!clepple>
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  4:55           ` Bill J.Xu
@ 2003-08-22 11:27             ` Russell King
  0 siblings, 0 replies; 13+ messages in thread
From: Russell King @ 2003-08-22 11:27 UTC (permalink / raw)
  To: Bill J.Xu; +Cc: Charles Lepple, linux-kernel

On Fri, Aug 22, 2003 at 12:55:48PM +0800, Bill J.Xu wrote:
> Yeah,that is the result after pressing ctrl+c, ctrl+d. maybe od do not get the "ctrl+c" signal.
> But I use SecureCRT with the same configration at the same PC to telnet the linux box,everything is OK.
> So I think that if there is some thing wrong with linux kernel?

Check /proc/tty/driver/serial for framing errors.

Also check that both ends of your serial link are appropriately configured.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  1:50   ` Bill J.Xu
@ 2003-08-22 13:16     ` Richard B. Johnson
  0 siblings, 0 replies; 13+ messages in thread
From: Richard B. Johnson @ 2003-08-22 13:16 UTC (permalink / raw)
  To: Bill J.Xu; +Cc: Linux kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 642 bytes --]

On Fri, 22 Aug 2003, Bill J.Xu wrote:

> I use the serial line to connect my computer with linux box, and I use the SecureCRT.
> The following is the corresponding configuration of linux box' inittab file.
>
> # Serial lines
> s1:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100
> s2:12345:respawn:/sbin/agetty 9600 ttyS1 vt100
>
> Thank you, dear Dick Johnson
>

Try this attached software. I was never satisfied with the
'getties' supplied by distributors when trying to use
RS-232C terminals.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.


[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 24141 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22  3:22       ` Bill J.Xu
  2003-08-22  4:14         ` Charles Lepple
@ 2003-08-22 13:22         ` Edgar Toernig
  2003-09-01  4:50           ` Bill J.Xu
  1 sibling, 1 reply; 13+ messages in thread
From: Edgar Toernig @ 2003-08-22 13:22 UTC (permalink / raw)
  To: Bill J.Xu; +Cc: linux-kernel

"Bill J.Xu" wrote:
> 
> after run od -tx1, the following is the result
> ------------------------------------------------
> bash-2.05# ./od -tx1
> 0000000
> ------------------------------------------------

Either terminal sends nothing or line-discipline caught ^C correctly
but sent signal to wrong process or process ignores sigint.

> and I use "killall xxx_appname" to kill the progress after telnet the linux box.

Check whether "killall -INT xxx_appname" is able to kill the process.

Try killing the process via Ctrl-Z and then "kill %%".

Ciao, ET.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: "ctrl+c" disabled!
  2003-08-22 13:22         ` Edgar Toernig
@ 2003-09-01  4:50           ` Bill J.Xu
  0 siblings, 0 replies; 13+ messages in thread
From: Bill J.Xu @ 2003-09-01  4:50 UTC (permalink / raw)
  To: Edgar Toernig, root, rmk; +Cc: linux-kernel

Thanks all of you for helping me to resole the problem of "ctrl+c disable".

and now, the problem has been resolved.At the very start,when the system start,it give the user a shell prompt directly,at this instance,the "ctrl+c" disable. Afterward,I change the file of "/etc/inittab" as this:"s1:12345:respawn:/sbin/agetty 9600 ttyS0 vt100",then the problem is resolved.Maybe this is a apish a mistake.
:-)

thanks

Bill

----- Original Message ----- 
From: "Edgar Toernig" <froese@gmx.de>
To: "Bill J.Xu" <xujz@neusoft.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Friday, August 22, 2003 9:22 PM
Subject: Re: "ctrl+c" disabled!


> "Bill J.Xu" wrote:
> > 
> > after run od -tx1, the following is the result
> > ------------------------------------------------
> > bash-2.05# ./od -tx1
> > 0000000
> > ------------------------------------------------
> 
> Either terminal sends nothing or line-discipline caught ^C correctly
> but sent signal to wrong process or process ignores sigint.
> 
> > and I use "killall xxx_appname" to kill the progress after telnet the linux box.
> 
> Check whether "killall -INT xxx_appname" is able to kill the process.
> 
> Try killing the process via Ctrl-Z and then "kill %%".
> 
> Ciao, ET.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-09-01  7:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-21 12:30 "ctrl+c" disabled! Bill J.Xu
2003-08-21 12:46 ` Richard B. Johnson
2003-08-22  1:50   ` Bill J.Xu
2003-08-22 13:16     ` Richard B. Johnson
2003-08-22  2:04 ` Edgar Toernig
2003-08-22  2:12   ` Bill J.Xu
2003-08-22  2:42     ` Edgar Toernig
2003-08-22  3:22       ` Bill J.Xu
2003-08-22  4:14         ` Charles Lepple
2003-08-22  4:55           ` Bill J.Xu
2003-08-22 11:27             ` Russell King
2003-08-22 13:22         ` Edgar Toernig
2003-09-01  4:50           ` Bill J.Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox