OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 .B #define _GNU_SOURCE
39 .br
40 .B #include <signal.h>
41 .sp
42 .B typedef void (*sighandler_t)(int);
43 .sp
44 .BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler );
45 .\"O .SH DESCRIPTION
46 .SH ÀâÌÀ
47 .\"O The
48 .\"O .BR sysv_signal ()
49 .\"O function takes the same arguments, and performs the same task, as
50 .\"O .BR signal (2).
51 .BR sysv_signal ()
52 ´Ø¿ô¤Ï
53 .BR signal (2)
54 ¤ÈƱ¤¸°ú¤­¿ô¤ò¤È¤ê¡¢Æ±¤¸½èÍý¤ò¼Â¹Ô¤¹¤ë¡£
55
56 .\"O However
57 .\"O .BR sysv_signal ()
58 .\"O provides the System V unreliable signal semantics, that is:
59 .\"O a) the disposition of the signal is reset to the default
60 .\"O when the handler is invoked;
61 .\"O b) delivery of further instances of the signal is not blocked while
62 .\"O the signal handler is executing; and
63 .\"O c) if the handler interrupts (certain) blocking system calls,
64 .\"O then the system call is not automatically restarted.
65 ¤·¤«¤·¤Ê¤¬¤é¡¢
66 .BR sysv_signal ()
67 ¤Ï System V ¤Î¿®ÍêÀ­¤Ë·ç¤±¤ë¥·¥°¥Ê¥ë½èÍýÊý¼°¤òÄ󶡤·¤Æ¤¤¤ë¡£
68 ¿®ÍêÀ­¤Ë·ç¤±¤ë¥·¥°¥Ê¥ë½èÍýÊý¼°¤Ï°Ê²¼¤ÎÆÃħ¤ò»ý¤Ä¡£
69 a) ¥Ï¥ó¥É¥é¤¬µ¯Æ°¤µ¤ì¤ë¤È¡¢¥·¥°¥Ê¥ë¤Î½èÍýÊýË¡ (disposition) ¤¬
70 ¥Ç¥Õ¥©¥ë¥È¤Ë¥ê¥»¥Ã¥È¤µ¤ì¤ë¡¢
71 b) ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Î¼Â¹ÔÃæ¤Ï¡¢¤½¤ì°Ê¹ß¤ËȯÀ¸¤·¤¿Æ±¤¸¥·¥°¥Ê¥ë¤ÎÇÛÁ÷¤¬
72 ¥Ö¥í¥Ã¥¯¤µ¤ì¤Ê¤¤¡¢
73 c) ¥Ï¥ó¥É¥é¤¬Ää»ßÃæ¤Î (blocking ¤·¤Æ¤¤¤ë) ¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÃæÃǤ·¤¿¾ì¹ç¡¢
74 ¼«Æ°Åª¤ËºÆ³«¤µ¤ì¤Ê¤¤¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬¤¢¤ë¡£
75 .\"O .SH "RETURN VALUE"
76 .SH ÊÖ¤êÃÍ
77 .\"O The
78 .\"O .BR sysv_signal ()
79 .\"O function returns the previous value of the signal handler, or
80 .\"O .B SIG_ERR
81 .\"O on error.
82 .BR sysv_signal ()
83 ´Ø¿ô¤Ï¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ÎľÁ°¤ÎÃͤòÊÖ¤¹¡£
84 ¥¨¥é¡¼¤Î¾ì¹ç¡¢
85 .B SIG_ERR
86 ¤òÊÖ¤¹¡£
87 .\"O .SH ERRORS
88 .SH ¥¨¥é¡¼
89 .\"O As for
90 .\"O .BR signal (2).
91 .BR signal (2)
92 ¤ÈƱ¤¸¡£
93 .\"O .SH "CONFORMING TO"
94 .SH ½àµò
95 .\"O This function is nonstandard.
96 ¤³¤Î´Ø¿ô¤ÏÈóɸ½à¤Ç¤¢¤ë¡£
97 .\"O .SH NOTES
98 .SH Ãí°Õ
99 .\"O Use of
100 .\"O .BR sysv_signal ()
101 .\"O should be avoided; use
102 .\"O .BR sigaction (2)
103 .\"O instead.
104 .BR sysv_signal ()
105 ¤Î»ÈÍѤÏÈò¤±¤ë¤Ù¤­¤Ç¤¢¤ë¡£Âå¤ï¤ê¤Ë
106 .BR sigaction (2)
107 ¤ò»È¤¦¤³¤È¡£
108
109 .\"O On older Linux systems,
110 .\"O .BR sysv_signal ()
111 .\"O and
112 .\"O .BR signal (2)
113 .\"O were equivalent.
114 .\"O But on newer systems,
115 .\"O .BR signal (2)
116 .\"O provides reliable signal semantics; see
117 .\"O .BR signal (2)
118 .\"O for details.
119 °ÊÁ°¤Î Linux ¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
120 .BR sysv_signal ()
121 ¤È
122 .BR signal (2)
123 ¤ÏÅù²Á¤Ç¤¢¤Ã¤¿¡£¤·¤«¤·¡¢¿·¤·¤á¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
124 .BR signal (2)
125 ¤Ï¿®ÍêÀ­¤Î¤¢¤ë¥·¥°¥Ê¥ë½èÍýÊý¼°¤òÄ󶡤·¤Æ¤¤¤ë¡£
126 ¾ÜºÙ¤Ï
127 .BR signal (2)
128 ¤ò»²¾È¡£
129
130 .\"O The use of
131 .\"O .I sighandler_t
132 .\"O is a GNU extension;
133 .\"O this type is only defined if 
134 .\"O this type is only defined if
135 .\"O the
136 .\"O .B _GNU_SOURCE
137 .\"O feature test macro is defined.
138 .I sighandler_t
139 ¤ò»È¤Ã¤Æ¤¤¤ë¤Î¤Ï GNU ¤Ë¤è¤ë³ÈÄ¥¤Ç¤¢¤ë¡£
140 ¤³¤Î·¿¤Ïµ¡Ç½¸¡ºº¥Þ¥¯¥í
141 .B _GNU_SOURCE
142 ¤òÄêµÁ¤·¤¿¾ì¹ç¤Ë¤Î¤ßÄêµÁ¤µ¤ì¤ë¡£
143 .\"O .SH "SEE ALSO"
144 .SH ´ØÏ¢¹àÌÜ
145 .BR sigaction (2),
146 .BR signal (2),
147 .BR bsd_signal (3),
148 .BR feature_test_macros (7),
149 .BR signal (7)