1 .\" Copyright (c) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI
24 .\" all rights reserved.
25 .\" Translated 2007-06-02, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
27 .\"WORD: reliable ¿®ÍêÀ¤Î¤¢¤ë
28 .\"WORD: unreliable ¿®ÍêÀ¤Ë·ç¤±¤ë
29 .\"WORD: signal semantics ¥·¥°¥Ê¥ë½èÍýÊý¼°
31 .TH SYSV_SIGNAL 3 2007-05-04 "" "Linux Programmer's Manual"
34 .\"O sysv_signal \- signal handling with System V semantics
35 sysv_signal \- System V Êý¼°¤Î¥·¥°¥Ê¥ë½èÍý
38 .B #define _GNU_SOURCE
40 .B #include <signal.h>
42 .B typedef void (*sighandler_t)(int);
44 .BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler );
48 .\"O .BR sysv_signal ()
49 .\"O function takes the same arguments, and performs the same task, as
54 ¤ÈƱ¤¸°ú¤¿ô¤ò¤È¤ê¡¢Æ±¤¸½èÍý¤ò¼Â¹Ô¤¹¤ë¡£
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.
67 ¤Ï System V ¤Î¿®ÍêÀ¤Ë·ç¤±¤ë¥·¥°¥Ê¥ë½èÍýÊý¼°¤òÄ󶡤·¤Æ¤¤¤ë¡£
68 ¿®ÍêÀ¤Ë·ç¤±¤ë¥·¥°¥Ê¥ë½èÍýÊý¼°¤Ï°Ê²¼¤ÎÆÃħ¤ò»ý¤Ä¡£
69 a) ¥Ï¥ó¥É¥é¤¬µ¯Æ°¤µ¤ì¤ë¤È¡¢¥·¥°¥Ê¥ë¤Î½èÍýÊýË¡ (disposition) ¤¬
70 ¥Ç¥Õ¥©¥ë¥È¤Ë¥ê¥»¥Ã¥È¤µ¤ì¤ë¡¢
71 b) ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Î¼Â¹ÔÃæ¤Ï¡¢¤½¤ì°Ê¹ß¤ËȯÀ¸¤·¤¿Æ±¤¸¥·¥°¥Ê¥ë¤ÎÇÛÁ÷¤¬
73 c) ¥Ï¥ó¥É¥é¤¬Ää»ßÃæ¤Î (blocking ¤·¤Æ¤¤¤ë) ¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÃæÃǤ·¤¿¾ì¹ç¡¢
74 ¼«Æ°Åª¤ËºÆ³«¤µ¤ì¤Ê¤¤¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬¤¢¤ë¡£
75 .\"O .SH "RETURN VALUE"
78 .\"O .BR sysv_signal ()
79 .\"O function returns the previous value of the signal handler, or
83 ´Ø¿ô¤Ï¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ÎľÁ°¤ÎÃͤòÊÖ¤¹¡£
93 .\"O .SH "CONFORMING TO"
95 .\"O This function is nonstandard.
96 ¤³¤Î´Ø¿ô¤ÏÈóɸ½à¤Ç¤¢¤ë¡£
100 .\"O .BR sysv_signal ()
101 .\"O should be avoided; use
102 .\"O .BR sigaction (2)
105 ¤Î»ÈÍѤÏÈò¤±¤ë¤Ù¤¤Ç¤¢¤ë¡£Âå¤ï¤ê¤Ë
109 .\"O On older Linux systems,
110 .\"O .BR sysv_signal ()
113 .\"O were equivalent.
114 .\"O But on newer systems,
116 .\"O provides reliable signal semantics; see
119 °ÊÁ°¤Î Linux ¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
123 ¤ÏÅù²Á¤Ç¤¢¤Ã¤¿¡£¤·¤«¤·¡¢¿·¤·¤á¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
125 ¤Ï¿®ÍêÀ¤Î¤¢¤ë¥·¥°¥Ê¥ë½èÍýÊý¼°¤òÄ󶡤·¤Æ¤¤¤ë¡£
132 .\"O is a GNU extension;
133 .\"O this type is only defined if
134 .\"O this type is only defined if
137 .\"O feature test macro is defined.
139 ¤ò»È¤Ã¤Æ¤¤¤ë¤Î¤Ï GNU ¤Ë¤è¤ë³ÈÄ¥¤Ç¤¢¤ë¡£
140 ¤³¤Î·¿¤Ïµ¡Ç½¸¡ºº¥Þ¥¯¥í
142 ¤òÄêµÁ¤·¤¿¾ì¹ç¤Ë¤Î¤ßÄêµÁ¤µ¤ì¤ë¡£
148 .BR feature_test_macros (7),