CTRL/C does not work


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers CTRL/C does not work
# 1  
Old 11-09-2008
CTRL/C does not work

Hi

My CTRL/C does not work thought the STTY setting looks Ok
Appreciate your assistance



$stty -a

speed 38400 baud;
rows = 24; columns = 80; ypixels = 0; xpixels = 0;
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
# 2  
Old 11-09-2008
Elaborate on "does not work" please. What does it not do? Does it work in some programmes, but not others? If so, which ones? Does it work if you just hit it at the shell prompt (i.e. cancel the command and prompt again)?
# 3  
Old 11-09-2008
It never works as supposed to for interruption of foreground process (my uderstaning). For example I run "tail -f myfile" on crtl/c I must be able to interrupt it, when I hit it it displays ^C
characters on the screen in that's it. Ctrl/z works Ok putting task into backgound Ok.
# 4  
Old 11-09-2008
How about if you set it again using stty intr (hit Ctrl-C), does it still just print ^C each time you hit it?
# 5  
Old 11-09-2008
Yes that's exactly what I have done and it does not make any difference just prints ^C

just in case tried :
stty intr "^C"
stty intr '^C'
stty intr ^C

but no luck
# 6  
Old 11-09-2008
Weird!

How about setting it to ^B instead?

Also, try setting it by typing stty intr followed by a space, a ^ and then a c. stty understands this format too usually.

What operating system are you using exactly? And what terminal emulator? What is your $TERM set to?
# 7  
Old 11-10-2008
This is a very old sun box - SunOS hgcgln02 5.6 Generic_105181-22 sun4m sparc SUNW,SPARCstation-5
The $TERM is set to xterm. I wanted to set to vt100 but when I run
stty term=vt100
I got
unknown mode: term=vt100
may be this is the problem ?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

"/usr/sbin/hpacucli ctrl all show" command does not work

Dear Concern, We have observed that following command stuck/does not work in some RedHat nodes. Please advise us to troubleshoot the issue. /usr/sbin/hpacucli ctrl all show Note: HP Array Configuration Utility CLI for Linux 64-bit With Best Regards, Md. Abdullah-Al Kauser (3 Replies)
Discussion started by: makauser
3 Replies

2. Shell Programming and Scripting

Automation of keyboard inputs..like Ctrl+d and Ctrl+a

Hi..! I'm stuck with my automation of starting a process and keeping it running even after the current ssh session has exited.. So i'm trying to use command 'screen'. which is doing exactly what i wanted, But the problem is automation of the same. i will have to press Ctrl+a and Ctrl+d for... (2 Replies)
Discussion started by: chandana hs
2 Replies

3. UNIX for Dummies Questions & Answers

Ctrl-V + Ctrl-J for newline character does not work inside vi editor

Hi friends, I am trying to add a newline char ('\n') between the query and the commit statement in the following shell script. #! /bin/sh echo "select * from tab; commit;" > data.sql I have tried typing in "Ctrl-V + Ctrl-J" combination which has inserted ^@ (NUL) character but the commit... (1 Reply)
Discussion started by: royalibrahim
1 Replies

4. Shell Programming and Scripting

How to handle CTRL+Z or CTRL+C in shells script?

Hi, while executing shell script, in the middle of the process, if we kill the shell script( ctrl+z or ctrl+c), script will be killed and the files which using for the script will be in the folder. How to handle those scenarios. Is there any possibilities, if user breaks the script, I need to... (3 Replies)
Discussion started by: ckchelladurai
3 Replies

5. Shell Programming and Scripting

Ctrl-C or Ctrl-Z causing exit the session

H! I have written script where it need to invoke the perl script in background, then write the pid in temp file then bring back the job to foreground. whenever the Ctrl-C or Ctrl-Z is pressed in the script has to exit and prompt should be dispalyed. but this script causing exit from shell session... (2 Replies)
Discussion started by: jramesh1
2 Replies

6. UNIX for Dummies Questions & Answers

Ctrl-enter doesn't work when running Midnight Commander in xterm

When running MC in xterm or gnome-terminal, it doesn't seem to allow the use of Ctrl-enter and Ctr-shift-enter to copy marked files to the command line. Does anyone know of another way to cause this to happen or a way to enable it under xterm/gnome-term? With thanks, Narnie (0 Replies)
Discussion started by: Narnie
0 Replies

7. UNIX for Dummies Questions & Answers

ctrl-o in bash on os X leopard -- how does it work exactly?

I'm going through "learning the bash shell" by newham and rosenblatt. I'm trying to ctro-O to execute and then go on to the next command in the history list, ctrl-o again, etc. (I'm just trying to get a feel for it in case I want to use it). But ctrl-o does nothing. Can someone help me out as to... (5 Replies)
Discussion started by: Straitsfan
5 Replies

8. Shell Programming and Scripting

Catching ctrl-C or ctrl-D

Hi there, I'm using HP-UX 11 machine. I am running a script, thats gonna take a long time to execute. When I press ctrl-c to come out of my script, I have to catch that signal(ctrl-c) and display that ctrl-c had been pressed. How can I do it. Thanks in advance (2 Replies)
Discussion started by: sendhilmani123
2 Replies

9. AIX

Disable ctrl-c,ctrl-d,ctrl-d in ksh script

I wrote a ksh script for Helpdesk. I need to know how to disable ctrl-c,ctrl-z,ctrl-d..... so that helpdesk would not be able to get to system prompt :confused: (6 Replies)
Discussion started by: wtofu
6 Replies

10. UNIX for Dummies Questions & Answers

my ctrl+c doesn't work

it seams that my ctrl+c and my ctrl+d don't work. if I type a bunch of jiberish on a line and ctrl+c I expect the command to be cancelled and to be given a fresh prompt, but instead it just putts ^C at the end of the line. Also, ctrl+d should close the session, but instead mine just puts ^D at... (3 Replies)
Discussion started by: yankee428
3 Replies
Login or Register to Ask a Question