1833948 Members
1589 Online
110063 Solutions
New Discussion

Re: Control-C disabled

 
SOLVED
Go to solution
Sean OB_1
Honored Contributor

Control-C disabled

Hello!

I have one server where control-c doesn't work for any users. I can't find anything in the /etc/profile local .profile .cshrc .kshrc etc.

I've tried removing both the /etc/profile and local .profiles for a user and logging in as that user but control-c is still disabled.

What else can I check?

8 REPLIES 8
Steve Steel
Honored Contributor

Re: Control-C disabled

Hi

/etc/profile

and

stty -a


speed 9600 baud; line = 0;
rows = 24; columns = 80
min = 1; time = 1;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 = ^@; swtch = ^@
stop = ^S; start = ^Q; susp = ^Z; dsusp = ^@
werase ; lnext
parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk -crts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop



check value of intr


steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Zafar A. Mohammed_1
Trusted Contributor

Re: Control-C disabled

check stty -a

thanks
zafar
Pete Ellis
Trusted Contributor
Solution

Re: Control-C disabled

Sean,

The default settings can be displayed using;

stty -a < /dev/ttyconf

the stty man page explains that root can changed these, check that nobody has!

Sean OB_1
Honored Contributor

Re: Control-C disabled

I guess I should have been more specific.

I know that the stty int is set incorrectly, but I don't know where it is being set.

It isn't being set in /etc/profile or in any local user files.

So where would this be set?

TIA,

Sean
Sean OB_1
Honored Contributor

Re: Control-C disabled

Thanks Pete, that pointed me in the right direction. Then a little RTFM and it's all fixed.

Now to figure out why it was changed in the first place!
Pete Ellis
Trusted Contributor

Re: Control-C disabled

Sean,

Have you done a make_net_recovery recently, we have a case logged with HP. Ignite software update required!!!

Cheers
Sean OB_1
Honored Contributor

Re: Control-C disabled

Well I spoke too soon.

I did a stty intr '^C' < /dev/ttyconf

per the man page to set them. I logged on another session and all was ok.

Then I had to reboot the server and now things are back to the way they were.

# stty -a
speed 9600 baud; line = 0;
rows = 24; columns = 80
min = 4; time = 0;
intr = DEL; quit = ^\; erase = ^H; kill = @
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo -echoe -echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3
Mark Greene_1
Honored Contributor

Re: Control-C disabled

Write a script to do:

stty intr '^C' < /dev/ttyconf
stty kill '^U' < /dev/ttyconf

(kill doesn't have to be U, but making it something other than @ helps to not drive yourself crazy.)

and add that script to /etc/rc.config.d and call it during boot so these get fixed automatically.

HTH
mark
the future will be a lot like now, only later