Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ctrl-c stopped working in cygwin

Tags:

cygwin

tty

sigint

Ctrl-c (SIGINT/SIGTERM) stopped working in cygwin. If I recall, this might have something to do with TTY settings. Please advise on how to get it working again. I did not change anything intentionally

Output from stty -a:

$ stty -a
speed 38400 baud; rows 25; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = ^Z; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; 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 -tostop -echoctl -echoke

When pressing ctrl-c the title of the cmd window changes to ~ from Select~. Ctrl-c also interrupts a program executing but does not create a new line.

I am also running on the sessions ssh-agent

I think this might be fixed witha computer restart but let me know if you have any idea.s

like image 915
MetaChrome Avatar asked Apr 16 '12 07:04

MetaChrome


1 Answers

I found this question when I wanted to shut down a Java process started in a Cygwin session, and Ctrl+C wasn't working for me. Then realised I could just kill the process from another Cygwin session, i.e. in a new session:

ps - ef | grep java
kill -9 <pid>
like image 191
lucrussell Avatar answered Sep 27 '22 21:09

lucrussell