OSDN Git Service

8b85268b3bbe6af477a336955c4e3acc687f6536
[linuxjm/LDP_man-pages.git] / draft / man3 / sysv_signal.3
1 .\" Copyright (c) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Japanese Version Copyright (c) 2007  Akihiro MOTOKI
24 .\"         all rights reserved.
25 .\" Translated 2007-06-02, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
26 .\" 
27 .\"WORD:        reliable        信頼性のある
28 .\"WORD:        unreliable      信頼性に欠ける
29 .\"WORD:        signal semantics        シグナル処理方式
30 .\" 
31 .TH SYSV_SIGNAL 3 2007-05-04 "" "Linux Programmer's Manual"
32 .\"O .SH NAME
33 .SH 名前
34 .\"O sysv_signal \- signal handling with System V semantics
35 sysv_signal \- System V 方式のシグナル処理
36 .\"O .SH SYNOPSIS
37 .SH 書式
38 .\"O .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
39 .BR "#define _GNU_SOURCE" "         /* feature_test_macros(7) 参照 */"
40 .br
41 .B #include <signal.h>
42 .sp
43 .B typedef void (*sighandler_t)(int);
44 .sp
45 .BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler );
46 .\"O .SH DESCRIPTION
47 .SH 説明
48 .\"O The
49 .\"O .BR sysv_signal ()
50 .\"O function takes the same arguments, and performs the same task, as
51 .\"O .BR signal (2).
52 .BR sysv_signal ()
53 関数は
54 .BR signal (2)
55 と同じ引き数をとり、同じ処理を実行する。
56
57 .\"O However
58 .\"O .BR sysv_signal ()
59 .\"O provides the System V unreliable signal semantics, that is:
60 .\"O a) the disposition of the signal is reset to the default
61 .\"O when the handler is invoked;
62 .\"O b) delivery of further instances of the signal is not blocked while
63 .\"O the signal handler is executing; and
64 .\"O c) if the handler interrupts (certain) blocking system calls,
65 .\"O then the system call is not automatically restarted.
66 しかしながら、
67 .BR sysv_signal ()
68 は System V の信頼性に欠けるシグナル処理方式を提供している。
69 信頼性に欠けるシグナル処理方式は以下の特徴を持つ。
70 a) ハンドラが起動されると、シグナルの処理方法 (disposition) が
71 デフォルトにリセットされる、
72 b) シグナルハンドラの実行中は、それ以降に発生した同じシグナルの配送が
73 ブロックされない、
74 c) ハンドラが停止中の (blocking している) システムコールを中断した場合、
75 自動的に再開されないシステムコールがある。
76 .\"O .SH "RETURN VALUE"
77 .SH 返り値
78 .\"O The
79 .\"O .BR sysv_signal ()
80 .\"O function returns the previous value of the signal handler, or
81 .\"O .B SIG_ERR
82 .\"O on error.
83 .BR sysv_signal ()
84 関数はシグナルハンドラの直前の値を返す。
85 エラーの場合、
86 .B SIG_ERR
87 を返す。
88 .\"O .SH ERRORS
89 .SH エラー
90 .\"O As for
91 .\"O .BR signal (2).
92 .BR signal (2)
93 と同じ。
94 .\"O .SH "CONFORMING TO"
95 .SH 準拠
96 .\"O This function is nonstandard.
97 この関数は非標準である。
98 .\"O .SH NOTES
99 .SH 注意
100 .\"O Use of
101 .\"O .BR sysv_signal ()
102 .\"O should be avoided; use
103 .\"O .BR sigaction (2)
104 .\"O instead.
105 .BR sysv_signal ()
106 の使用は避けるべきである。代わりに
107 .BR sigaction (2)
108 を使うこと。
109
110 .\"O On older Linux systems,
111 .\"O .BR sysv_signal ()
112 .\"O and
113 .\"O .BR signal (2)
114 .\"O were equivalent.
115 .\"O But on newer systems,
116 .\"O .BR signal (2)
117 .\"O provides reliable signal semantics; see
118 .\"O .BR signal (2)
119 .\"O for details.
120 以前の Linux システムでは、
121 .BR sysv_signal ()
122
123 .BR signal (2)
124 は等価であった。しかし、新しめのシステムでは、
125 .BR signal (2)
126 は信頼性のあるシグナル処理方式を提供している。
127 詳細は
128 .BR signal (2)
129 を参照。
130
131 .\"O The use of
132 .\"O .I sighandler_t
133 .\"O is a GNU extension;
134 .\"O this type is only defined if 
135 .\"O this type is only defined if
136 .\"O the
137 .\"O .B _GNU_SOURCE
138 .\"O feature test macro is defined.
139 .I sighandler_t
140 を使っているのは GNU による拡張である。
141 この型は機能検査マクロ
142 .B _GNU_SOURCE
143 を定義した場合にのみ定義される。
144 .\"O .SH "SEE ALSO"
145 .SH 関連項目
146 .BR sigaction (2),
147 .BR signal (2),
148 .BR bsd_signal (3),
149 .BR signal (7)