"ctrl+c" disabled!
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
Quoted 10 lines · Bill J.Xu
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.
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" <[email protected]>
To: "Bill J.Xu" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, August 21, 2003 8:46 PM
Subject: Re: "ctrl+c" disabled!
Quoted 25 lines · Bill J.Xu
Quoted 11 lines
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
gettythat 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.
Quoted 9 lines · Bill J.Xu
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 vt100Thank 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.
Quoted 6 lines · Bill J.Xu
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.
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" <[email protected]>
To: "Bill J.Xu" <[email protected]>
Cc: <[email protected]>
Sent: Friday, August 22, 2003 10:04 AM
Subject: Re: "ctrl+c" disabled!
Quoted 19 lines
Quoted 6 lines · Bill J.Xu
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.
Quoted 11 lines · Bill J.Xu
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;(quoted diff) +0
-3-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany -imaxbel
Quoted 5 lines
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.
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" <[email protected]>
To: "Bill J.Xu" <[email protected]>
Cc: <[email protected]>
Sent: Friday, August 22, 2003 10:42 AM
Subject: Re: "ctrl+c" disabled!
Quoted 36 lines
Quoted 11 lines · Bill J.Xu
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;(quoted diff) +0
-3-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany -imaxbelQuoted 5 lines
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 badHmm... 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 4 lines · Bill J.Xu
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.
Signature · 1 line
Charles Lepple <ghz.cc!clepple>
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" <[email protected]>
To: <[email protected]>
Sent: Friday, August 22, 2003 12:14 PM
Subject: Re: "ctrl+c" disabled!
Quoted 23 lines
Quoted 4 lines · Bill J.Xu
after run od -tx1, the following is the result
------------------------------------------------
bash-2.05# ./od -tx1
0000000That'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->Copyfunction.Signature · 8 lines
Charles Lepple <ghz.cc!clepple> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Quoted 3 lines · Bill J.Xu
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.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 6 lines · Bill J.Xu
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.
Quoted 1 line
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.
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" <[email protected]>
To: "Bill J.Xu" <[email protected]>
Cc: <[email protected]>
Sent: Friday, August 22, 2003 9:22 PM
Subject: Re: "ctrl+c" disabled!
Quoted 24 lines
Quoted 6 lines · Bill J.Xu
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.
Quoted 1 line
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/