OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / siginterrupt.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sun Jul 25 10:40:51 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified Sun Apr 14 16:20:34 1996 by Andries Brouwer (aeb@cwi.nl)
29 .\"
30 .\" Japanese Version Copyright (c) 1998 HANATAKA Shinya
31 .\"         all rights reserved.
32 .\" Translated Sun May 24 13:44:00 JST 1998
33 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
34 .\"
35 .TH SIGINTERRUPT 3 2009-03-15 "" "Linux Programmer's Manual"
36 .\"O .SH NAME
37 .SH Ì¾Á°
38 .\"O siginterrupt \- allow signals to interrupt system calls
39 siginterrupt \- ¥·¥°¥Ê¥ë¤Ç¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ë³ä¤ê¹þ¤à¤³¤È¤òµö¤¹
40 .\"O .SH SYNOPSIS
41 .SH ½ñ¼°
42 .nf
43 .B #include <signal.h>
44 .sp
45 .BI "int siginterrupt(int " sig ", int " flag );
46 .fi
47 .sp
48 .in -4n
49 .\"O Feature Test Macro Requirements for glibc (see
50 .\"O .BR feature_test_macros (7)):
51 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
52 .RB ( feature_test_macros (7)
53 »²¾È):
54 .in
55 .sp
56 .BR siginterrupt ():
57 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
58 .\"O .SH DESCRIPTION
59 .SH ÀâÌÀ
60 .\"O The
61 .\"O .BR siginterrupt ()
62 .\"O function changes the restart behavior when
63 .\"O a system call is interrupted by the signal \fIsig\fP.
64 .\"O If the \fIflag\fP
65 .\"O argument is false (0), then system calls will be restarted if interrupted
66 .\"O by the specified signal \fIsig\fP.
67 .\"O This is the default behavior in Linux.
68 .\"O However, when a new signal handler is specified with the
69 .\"O .BR signal (2)
70 .\"O function, the system call is interrupted by default.
71 .BR siginterrupt ()
72 ´Ø¿ô¤Ï¡¢¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤¬¥·¥°¥Ê¥ë \fIsig\fP
73 ¤Ë¤è¤Ã¤Æ³ä¤ê¹þ¤Þ¤ì¤¿¸å¡¢ºÆ¼Â¹Ô¤ÎºÝ¤Î¿¶¤ëÉñ¤¤¤òÊѹ¹¤¹¤ë¡£
74 \fIflag\fP °ú¤­¿ô¤¬µ¶ (0) ¤Ê¤é¤Ð¡¢¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤¬»ØÄꤷ¤¿
75 ¥·¥°¥Ê¥ë \fIsig\fP ¤Ë¤è¤Ã¤Æ³ä¤ê¹þ¤Þ¤ì¤¿¸å¤Ë¡¢¤½¤Î¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï
76 ºÆ¼Â¹Ô¤µ¤ì¤ë¡£¤³¤ì¤Ï Linux ¤Ë¤ª¤¤¤Æ¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî¤Ç¤¢¤ë¡£°ìÊý¡¢
77 .BR signal (2)
78 ´Ø¿ô¤Ç¿·¤·¤¤¥·¥°¥Ê¥ë¡¦¥Ï¥ó¥É¥é¡¼¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï
79 ¥Ç¥Õ¥©¥ë¥È¤Ç¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤ÏÃæÃǤµ¤ì¤ë¡£
80 .PP
81 .\"O If the \fIflag\fP argument is true (1) and no data has been transferred,
82 .\"O then a system call interrupted by the signal \fIsig\fP will return \-1
83 .\"O and \fIerrno\fP will be set to
84 .\"O .BR EINTR .
85 \fIflag\fP °ú¤­¿ô¤¬¿¿ (1) ¤Ç¥Ç¡¼¥¿¤ÎžÁ÷¤¬Á´¤¯¹Ô¤Ê¤ï¤ì¤Æ¤¤¤Ê¤¤¤Ê¤é¤Ð¡¢
86 ¥·¥°¥Ê¥ë \fIsig\fP ¤Ç¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤ÏÃæÃǤµ¤ì¤Æ¡¢\-1 ¤¬ÊÖ¤µ¤ì¡¢
87 \fIerrno\fP ¤Ë
88 .B EINTR
89 ¤¬ÀßÄꤵ¤ì¤ë¡£
90 .PP
91 .\"O If the \fIflag\fP argument is true (1) and data transfer has started,
92 .\"O then the system call will be interrupted and will return the actual
93 .\"O amount of data transferred.
94 \fIflag\fP °ú¤­¿ô¤¬¿¿ (1) ¤Ç¥Ç¡¼¥¿¤ÎžÁ÷¤¬³«»Ï¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢
95 ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤ÏÃæÃǤµ¤ì¡¢¤½¤ì¤Þ¤Ç¤Ë¼ÂºÝ¤ËžÁ÷¤µ¤ì¤¿¥Ç¡¼¥¿
96 ¤ÎÎ̤¬ÊÖ¤µ¤ì¤ë¡£
97 .\"O .SH "RETURN VALUE"
98 .SH ÊÖ¤êÃÍ
99 .\"O The
100 .\"O .BR siginterrupt ()
101 .\"O function returns 0 on success, or \-1 if the
102 .\"O signal number \fIsig\fP is invalid.
103 .BR siginterrupt ()
104 ´Ø¿ô¤ÏÀ®¸ù¤·¤¿¾ì¹ç 0 ¤òÊÖ¤¹¡£
105 ¥·¥°¥Ê¥ëÈÖ¹æ \fIsig\fP ¤¬ÉÔÀµ¤Ê¾ì¹ç¤Ï \-1 ¤òÊÖ¤¹¡£
106 .\"O .SH ERRORS
107 .SH ¥¨¥é¡¼
108 .TP
109 .B EINVAL
110 .\"O The specified signal number is invalid.
111 »ØÄꤷ¤¿¥·¥°¥Ê¥ëÈֹ椬ÉÔÀµ¤Ç¤¢¤ë¡£
112 .\"O .SH "CONFORMING TO"
113 .SH ½àµò
114 4.3BSD, POSIX.1-2001.
115 .\"O POSIX.1-2008 marks
116 .\"O .BR siginterrupt ()
117 .\"O as obsolete, recommending the use of
118 .\"O .BR sigaction (2)
119 .\"O with the
120 .\"O .B SA_RESTART
121 .\"O flag instead.
122 POSIX.1-2008 ¤Ï¡¢
123 .BR siginterrupt ()
124 ¤òÇÑ»ßͽÄê¤È¤·¤Æ¤¤¤ë¡£
125 Âå¤ï¤ê¤Ë¡¢
126 .BR sigaction (2)
127 ¤Ë
128 .B SA_RESTART
129 ¥Õ¥é¥°¤ò»ØÄꤷ¤Æ»È¤¦¤³¤È¤ò¿ä¾©¤·¤Æ¤¤¤ë¡£
130 .\"O .SH "SEE ALSO"
131 .SH ´ØÏ¢¹àÌÜ
132 .BR signal (2)