OSDN Git Service

76e270d2f901c3d668fb51026d11e442bc04f6ff
[linuxjm/LDP_man-pages.git] / release / 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 2011-09-09 "" "Linux Programmer's Manual"
36 .SH 名前
37 siginterrupt \- シグナルでシステム・コールに割り込むことを許す
38 .SH 書式
39 .nf
40 .B #include <signal.h>
41 .sp
42 .BI "int siginterrupt(int " sig ", int " flag );
43 .fi
44 .sp
45 .in -4n
46 glibc 向けの機能検査マクロの要件
47 .RB ( feature_test_macros (7)
48 参照):
49 .in
50 .sp
51 .BR siginterrupt ():
52 .ad l
53 .RS 4
54 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
55 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
56 .br
57 || /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
58 .RE
59 .ad
60 .SH 説明
61 .BR siginterrupt ()
62 関数は、システム・コールがシグナル \fIsig\fP
63 によって割り込まれた後、再実行の際の振る舞いを変更する。
64 \fIflag\fP 引き数が偽 (0) ならば、システム・コールが指定した
65 シグナル \fIsig\fP によって割り込まれた後に、そのシステム・コールは
66 再実行される。これは Linux においてデフォルトの動作である。
67 .PP
68 \fIflag\fP 引き数が真 (1) でデータの転送が全く行なわれていないならば、
69 シグナル \fIsig\fP でシステム・コールは中断されて、\-1 が返され、
70 \fIerrno\fP に
71 .B EINTR
72 が設定される。
73 .PP
74 \fIflag\fP 引き数が真 (1) でデータの転送が開始されていれば、
75 システム・コールは中断され、それまでに実際に転送されたデータ
76 の量が返される。
77 .SH 返り値
78 .BR siginterrupt ()
79 関数は成功した場合 0 を返す。
80 シグナル番号 \fIsig\fP が不正な場合は \-1 を返す。
81 .SH エラー
82 .TP
83 .B EINVAL
84 指定したシグナル番号が不正である。
85 .SH 準拠
86 4.3BSD, POSIX.1-2001.
87 POSIX.1-2008 は、
88 .BR siginterrupt ()
89 を廃止予定としている。
90 代わりに、
91 .BR sigaction (2)
92
93 .B SA_RESTART
94 フラグを指定して使うことを推奨している。
95 .SH 関連項目
96 .BR signal (2)