免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4554 | 回复: 3
打印 上一主题 下一主题

[SCO UNIX] bash中CTRL-C失效 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-08-08 16:55 |只看该作者 |倒序浏览
bash环境中Ctrl-C失效,导致无法中止一些命令,很麻烦,我的stty设置如下:
#2 disc;speed 9600 baud; 25 rows; 80 columns
erase = ^?; werase = ^W; kill = ^U; intr = ^C; quit = ^\; susp = ^Z
dsusp = ^Y; eof = ^D; eol = <undef>;; eol2 = <undef>;; stop = ^S
start = ^Q; lnext = ^V; discard = ^O; reprint = ^R; status = <undef>;
time = 0; min = 1
-parenb -parodd cs8 -cstopb hupcl cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe -echok -echonl -noflsh -mdmbuf -nohang
-tostop echoctl -echoprt echoke -altwerase iexten -nokerninfo
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tabs -onoeot

好像没有错啊?

如果切换到别的shell,比如csh,就可以了,我的bash是3.00, OS是OSF1 V5.1

论坛徽章:
0
2 [报告]
发表于 2005-08-09 15:00 |只看该作者

bash中CTRL-C失效

会不会是你的命令忽略了信号2(中断信号)才会这样!

论坛徽章:
0
3 [报告]
发表于 2005-08-10 17:11 |只看该作者

bash中CTRL-C失效

果然,我检查了/etc/profile文件,发现开头和结尾处均有
trap 2 3
这样的句子,我commentout 2,然后就ok

多谢!

BTW,trap 3 是干么的?会忽略什么信息?

论坛徽章:
0
4 [报告]
发表于 2005-08-10 22:15 |只看该作者

bash中CTRL-C失效

信号3其实也是一种终止类型!当用户键入QUIT字符(通常是Control +\)时,收到这个信号,这个信号生成内存信息转储(core dump)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP