Operating System - HP-UX
1834669 Members
2357 Online
110069 Solutions
New Discussion

Control+C or Control+Z don't work (HP 11.0)

 
FTSE SysAdmin
Frequent Advisor

Control+C or Control+Z don't work (HP 11.0)

Hi,

Im lost of ideas how to get the "control+c" and "control+Z" working on HPUX 11.00.

Users are using ksh, I've checked and deactivate all traps on the system profile and user profile.

Nonetheless the control-C doesn't seams to work when for example I type "find / -detph" ... Im missing something here! ...

Please help... Many thanks
Miguel Ribeiro
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: Control+C or Control+Z don't work (HP 11.0)

Hi,

Could you post the output from stty ?

# stty
speed 9600 baud; evenp hupcl -cread
min = 1; intr = ^C; erase = DEL; kill = ^U;
swtch ;
brkint -inpck icrnl -ixany ixoff onlcr
-iexten echo echoe echok
-echoctl -echoke

Regards,
Robert-Jan
Graham Cameron_1
Honored Contributor

Re: Control+C or Control+Z don't work (HP 11.0)

You need to run stty for each character you want to fix


eg
stty intr ^C
stty susp ^Z

Put these into your .profile.

Here are my (typical ?) settings

stty
speed 9600 baud; evenp hupcl
min = 1; intr = ^C; erase = ^H; kill = ^U;
eol2 = ^@; swtch = ^@;
susp = ^Z; dsusp = ^@;
werase = ^@; lnext = ^@;
-inpck -istrip icrnl -ixany ixoff onlcr
-iexten echo echoe echok

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Jeff Schussele
Honored Contributor

Re: Control+C or Control+Z don't work (HP 11.0)

Hi,

Run
stty -a
and note the values for
intr => usually Ctrl-C
? => Ctrl-Z
What does Ctrl-Z supposed to generate, quit, kill or what?

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
FTSE SysAdmin
Frequent Advisor

Re: Control+C or Control+Z don't work (HP 11.0)

hpsrv2:miguelr> stty
speed 9600 baud; evenp hupcl -cread
min = 1; time = 1; intr = ^C; erase = DEL; kill = ^U;
swtch ;
brkint -inpck icrnl -ixany ixoff onlcr
-iexten echo echoe echok
-echoctl -echoke

Regards,
Miguel
Miguel Ribeiro
A. Clay Stephenson
Acclaimed Contributor

Re: Control+C or Control+Z don't work (HP 11.0)

The very first thing to do is a stty -a and determine what intr and susp are set to. It's quite possible that intr has been redefined. By the way, there is really no reason on an HP-UX box to run the Korn shell. /usr/bin/sh (and /sbin/sh, for that matter) are POSIX shells and are a superset of the Korn shell.
If it ain't broke, I can fix that.
FTSE SysAdmin
Frequent Advisor

Re: Control+C or Control+Z don't work (HP 11.0)


Many thanks for your help.

One of the problems was a "hidden" trap in the /etc/profile

And some users had a dodgy profile setting the "intr" with ^Z.

the forgotten "stty -a" helped a lot :)

Best Regards,
Miguel
Miguel Ribeiro
FTSE SysAdmin
Frequent Advisor

Re: Control+C or Control+Z don't work (HP 11.0)


Ops sorry to come back with the same problem.

But in the last minutes I've found that the intr=^C only works with xterm sessions but users that are using dtterm, the crtl-c is ignored.
Miguel Ribeiro