免费注册 查看新帖 |

Chinaunix

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

[新手入门] kill -l的那些信号量都是干什么用的? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-06-25 14:06 |只看该作者 |倒序浏览
举个例子呗

论坛徽章:
0
2 [报告]
发表于 2003-06-25 14:35 |只看该作者

kill -l的那些信号量都是干什么用的?

SIGHUP
Hang-up. (1)
SIGINT
Interrupt. (2)
SIGQUIT
Quit. (3*)
SIGILL
Invalid instruction (not reset when caught). (4*)
SIGTRAP
Trace trap (not reset when caught). (5*)
SIGIOT
End process (see the abort subroutine). (6*)
SIGEMT
EMT instruction. (7*)
SIGFPE
Arithmetic exception, integer divide by 0, or floating-point exception.(8*)
SIGKILL
Kill (cannot be caught or ignored). (9)
SIGBUS
Specification exception. (10*)
SIGSEGV
Segmentation violation. (11*)
SIGSYS
Parameter not valid to subroutine. (12*)
SIGPIPE
Write on a pipe when there is no process to read it. (13)
SIGALRM
Alarm clock. (14)
SIGTERM
Software termination signal. (15)
SIGURG
Urgent condition on I/O channel. (16+)
SIGSTOP
Stop (cannot be caught or ignored). (17@)
SIGTSTP
Interactive stop. (18@)
SIGCONT
Continue if stopped. (19!)
SIGCHLD
To parent on child stop or exit. (20+)
SIGTTIN
Background read attempted from control terminal. (21@)
SIGTTOU
Background write attempted from control terminal. (22@)
SIGIO
Input/output possible or completed. (23+)
SIGXCPU
CPU time limit exceeded (see the setrlimit subroutine). (24)
SIGXFSZ
File size limit exceeded (see the setrlimit subroutine).(25)
reserved
(26)
SIGMSG
Input data has been stored into the input ring buffer. (27#)
SIGWINCH
Window size change. (28+)
SIGPWR
Power-fail restart. (29+)
SIGUSR1
User-defined signal 1. (30)
SIGUSR2
User-defined signal 2. (31)
SIGPROF
Profiling timer expired. (see the setitimer subroutine).(32)
SIGDANGER
Paging space low. (33+%)
SIGVTALRM
Virtual time alarm (see the setitimer subroutine). (34)
SIGMIGRATE
Migrate process. (35)
SIGPRE
Programming exception (user defined). (36)
reserved
(37-5
SIGGRANT
Monitor access wanted. (60#)
SIGRETRACT
Monitor access should be relinquished. (61#)
SIGSOUND
A sound control has completed execution. (62#)
SIGSAK
Secure attention key. (63)

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
3 [报告]
发表于 2003-06-25 14:40 |只看该作者

kill -l的那些信号量都是干什么用的?

HUP 挂起和挂断(hangup),接收到该信号的经常将被挂起
INT 中断(interrupt或reboot),接收到该信号的进程将被中止执行。
按中断键(通常为 <delete>,可发出该信号
KILL 杀死(kill).该信号不能被捕获或忽略(cannot be caught or ignored)
接收到该信号的进程将被强行杀死,即立即无条件中止运行

论坛徽章:
0
4 [报告]
发表于 2003-06-25 14:40 |只看该作者

kill -l的那些信号量都是干什么用的?

举个具体例子嘛
不明白啊
*是啥意思?

论坛徽章:
0
5 [报告]
发表于 2003-06-25 14:42 |只看该作者

kill -l的那些信号量都是干什么用的?

我的是最全的

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
6 [报告]
发表于 2003-06-25 14:51 |只看该作者

kill -l的那些信号量都是干什么用的?

[quote]原帖由 "shala"]我的是最全的[/quote 发表:
     
偶又不和你争
aixchina 偶上不去,又好东西多贴过来  :wink:

论坛徽章:
0
7 [报告]
发表于 2003-06-25 14:58 |只看该作者

kill -l的那些信号量都是干什么用的?

原帖由 "meteor06" 发表:
   
偶又不和你争
aixchina 偶上不去,又好东西多贴过来  :wink:
   

这里贴不方面查找,呵呵
贴在aixchina找起来方便一些

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
8 [报告]
发表于 2003-06-25 16:05 |只看该作者

kill -l的那些信号量都是干什么用的?

原帖由 "ewhisper" 发表:
举个具体例子嘛
不明白啊
*是啥意思?
   
unix 系统中使用kill 终止进程
实际上kill命令是通过发送信号的方式来使指定进程终止的?
信号是系统核心与进程,进程与进程之间进行通信的一种手段或机制,
通常描述为软件中断,又称为软中断信号,信号可以由系统发出,也可以由某些进程发出

执行以下shell
trap "exit" 3
while true
do
echo test
sleep 30
done

kill -3 杀该进程
然后, 将 trap 一行封住
再次用kill -3 杀该进程
效果是否不同      
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP