What are Unix signals?


一つの信号は、実行中のプロセスに送信できる情報です.
Signals can be initiated by programs,users,or administrators.信号は、プログラムを起動することができます.使用者または管理者.
For example,to the proper method of telling the Internet Daemen(inetd)to re-read its configration file is to send it a SIGHUP signal.は、例えば、適切な方法でインターネット保護プロセス(inetd)を教え、その構成ファイルを見直して、sighup信号を送る.
For example、if the current process ID(PID)of inetd is 4140、we would type:例えば、現在のプロセスID(PID制御)のinetdが4140年であれば、私達はタイプを作ります.
 kill -SIGHUP 4140 
Another common use of signals is to stop a running process.もう一つの一般的な使用信号は運行停止の過程です.To stop the inetd process copletely、we would use this command:inetdを停止するプロセスが完全に進行中です.このコマンドを使います.
 kill 4140 
By default,the kill command sends the SIGTRM signal.デフォルトでは、指揮を殺してsigterm信号に移送します.If SIGREM fails、we can escate to using the SIGKILL signal to stop the process:もしsigtermが失敗したら、私達はsigkill信号をアップグレードして使用して、プロセスを阻止できます.
 kill -9 4140 
Because SIGKILL cannot be handed、stopping a process with SIGKILL is generaly consided a bad idea.sigkillは処理できないので、制止過程でsigkillと一般的に悪い考えられています.Using SIGKILL prevents a process from cleaning up after itself and exiting gracefully.sigkillで一つのプロセスをブロックし、整理した後、自身はゆっくりと下降します.
Handling Signals信号処理
Each Unix signal has a default set of effects on a Unix program.Unix信号ごとにデフォルト設定の効果的なUnixプログラムがあります.Programers can code their appration s to repond in customized ways to most signals.プログラマは、コードとアプリケーションに応じてカスタマイズすることができます.The custom pieces of code are caled signal handles.これらの慣習部品コードは信号処理というものです.
Two signals are unable to be redefined by a signal handler.2つの信号は、信号プロセッサによって再定義されません.SIGKILL always stops a process and SIGS TOP always moves a process from the foreground to the background.sigkillはいつも一つの過程があります.sigstopはいつも一つの過程があります.フロントから楽屋まで.The se two signals cannot be「caght」by a signal handler.この二つの信号は「キャプチャ」されない信号プロセッサです.
FreeBSD Signals
Signal NameSignal NumberSignal Description
SIGHUP
1
Terminal line hangp
SIGINT
2
Interrupt program
SIGQUID
3
Quit program
SIGILL
4
Illgal instruction
SIGTRP
5
Trace trop
SIGABRT
6
Abort
SIGEMT
7
Emullate instruction executed
SIGFPE
8
Flooating-point exception
SIGKILL
9
Kill program
SIGBUS
10
Bus error
SIGS EGV
11
Segmentation violation
SIGS YS
12
Bad argment to system call
SIGPIPE
13
Write on a pipe with no one to read it
SIGALRM
14
Real-time timer expired
SIGTRERM
15
Software termination signal
SIGURG
16
Urgent condition on I/O chanel
SIGS TOP
17
Stop signal not from terminal
SIGT STP
18
Stop signal from terminal
SIG CONT
19
A stopped process is being continued
SIGCHLD
20
Notification to parent on child stop or exit
SIGTIN
21
Read on terminal by background process
SIGTO
22
Write to terminal by background process
SIGIO
23
I/O possible on a descriptor
SIGXCPU
24
CPU time limit exceeded
SIGXFSS
25
File-size limit exceeded
SIGVTALRM
26
Virtual timer expired
SIGPROF
27
Profiling timer expired
SIGW INCH
28
Window size changed
SIGINFO
29
Information request
SIGU SR 1
30
User-defined signal 1
SIGUSR 2
31
User-defined signal 2
SIGTHR
32
Thread interrupt
Solaris Signals
Signal NameSignal NumberSignal Description
SIGHUP
1
ハングアップ
SIGINT
2
Interrupts
SIGQUID
3
Quits
SIGILL
4
Illgal instruction
SIGTRP
5
Trace trop
SIGABRT
6
Used by abort
SIGEMT
7
EMT instruction
SIGFPE
8
Flooating-point exception
SIGKILL
9
Kill(cannot be caght or ignored)
SIGBUS
10
Bus error
SIGS EGV
11
Segmentation violation
SIGS YS
12
Bad argment to system call
SIGPIPE
13
Writes on a pipe with no one to read it
SIGALRM
14
Alarm clock
SIGTRERM
15
Software termination
SIGU SR 1
16
User-defined signal 1
SIGUSR 2
17
User-defined signal 2
SIGCHLD
18
Child status change alias(POSIX)
SIGPWR
19
Power-fail retart
SIGW INCH
20
Window size change
SIGURG
21
Urgent socket condition
SIGPOLL/SIGIO
22
Pollable event occurred or Socket I/O possible
SIGS TOP
23
Stop(cannot be caught or ignored)
SIGT STP
24
User stop requested from TTY
SIG CONT
25
Stoped process has been continued
SIGTIN
26
Background TTY read atempted
SIGTO
27
Background TTY write atempted
SIGVTALRM
28
Virtual timer expired
SIGPROF
29
Profiling timer expired
SIGXCPU
30
Exceeded CPU limit
SIGXFSS
31
Exceeded file size limit
SIGWATING
32
Process'LWPs are blocked
SIGWP
33
Special signal used by thread library
SIGFREEZE
34
Special signal used by CPR
SIGTO HAW
35
Special signal used by CPR
SIGCANCEL
36
Thread cancerllation signal used by libthread
SIGLOSTT
37
Resource lost
SIGRTMIN
38
Highest prority real-time signal
SIGRTMAX
45
Lowest priority real-time signal
<script type=「text/javascript」>