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
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.
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!
> 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.
>
>
>
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!
> "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.
>
"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.
"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.
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!
> "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 [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
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>
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!
> 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 [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
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 ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
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.
"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.
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!
> "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 [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>