kill -l
命令用于列出所有可用的信号名称和编号。每个信号有一个唯一的编号,通常以 SIG 开头。以下是常见的一些信号及其解释:
1) SIGHUP Hangup detected on controlling terminal or death of controlling process
2) SIGINT Interrupt from keyboard
3) SIGQUIT Quit from keyboard
4) SIGILL Illegal Instruction
5) SIGTRAP Trace/breakpoint trap
6) SIGABRT Abort signal from abort(3)
7) SIGBUS Bus error (bad memory access)
8) SIGFPE Floating point exception
9) SIGKILL Kill signal (cannot be caught or ignored)
10) SIGUSR1 User-defined signal 1
11) SIGSEGV Invalid memory reference
12) SIGUSR2 User-defined signal 2
13) SIGPIPE Broken pipe: write to pipe with no readers
14) SIGALRM Timer signal from alarm(2)
15) SIGTERM Termination signal
16) SIGSTKFLT Stack fault on coprocessor (unused)
17) SIGCHLD Child stopped or terminated
18) SIGCONT Continue if stopped
19) SIGSTOP Stop process (cannot be caught or ignored)
20) SIGTSTP Terminal stop signal
21) SIGTTIN Background process attempting read from terminal
22) SIGTTOU Background process attempting write to terminal
23) SIGURG Urgent condition on socket (4.2BSD)
24)SIGXCPU CPU time limit exceeded (4.2BSD)
25)SIGXFSZ File size limit exceeded (4.2BSD)
26) SIGVTALRM Virtual alarm clock (4.2BSD)
27) SIGPROF Profiling alarm clock (4.2BSD)
28) SIGWINCH Window size change
29)SIGIO I/O now possible (4.2BSD)
30)SIGPWR Power failure restart (System V)
31) SIGSYS Bad system call
34) SIGRTMIN Real-time signal 0
35) SIGRTMIN+1 Real-time signal 1
36) ... (更多的实时信号)
以上是一些常见的信号和它们的解释,可以根据需要在编程中使用适当的信号进行进程控制。
内容由零声教学AI助手提供,问题来源于学员提问