.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sun Jul 25 10:40:51 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Apr 14 16:20:34 1996 by Andries Brouwer (aeb@cwi.nl) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1998 HANATAKA Shinya .\" all rights reserved. .\" Translated Sun May 24 13:44:00 JST 1998 .\" by HANATAKA Shinya .\" .TH SIGINTERRUPT 3 2014\-06\-13 "" "Linux Programmer's Manual" .SH 名前 siginterrupt \- シグナルでシステムコールに割り込むことを許す .SH 書式 .nf \fB#include \fP .sp \fBint siginterrupt(int \fP\fIsig\fP\fB, int \fP\fIflag\fP\fB);\fP .fi .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBsiginterrupt\fP(): .ad l .RS 4 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED .br || /* glibc 2.12 以降: */ _POSIX_C_SOURCE\ >=\ 200809L .RE .ad .SH 説明 \fBsiginterrupt\fP() 関数は、システムコールがシグナル \fIsig\fP によって割り込まれた後、再実行の際の振る舞いを変更する。 \fIflag\fP 引き数が偽 (0) ならば、システムコールが指定した シグナル \fIsig\fP によって割り込まれた後に、そのシステムコールは 再実行される。これは Linux においてデフォルトの動作である。 .PP \fIflag\fP 引き数が真 (1) でデータの転送が全く行なわれていないならば、 シグナル \fIsig\fP でシステムコールは中断されて、\-1 が返され、 \fIerrno\fP に \fBEINTR\fP が設定される。 .PP \fIflag\fP 引き数が真 (1) でデータの転送が開始されていれば、 システムコールは中断され、それまでに実際に転送されたデータ の量が返される。 .SH 返り値 \fBsiginterrupt\fP() 関数は成功した場合 0 を返す。 シグナル番号 \fIsig\fP が不正な場合、 \-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEINVAL\fP 指定したシグナル番号が不正である。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" \fBsiginterrupt\fP() 関数は保護されていないグローバル変数を使用しているので、スレッドセーフではない。 .SH 準拠 4.3BSD, POSIX.1\-2001. POSIX.1\-2008 は、 \fBsiginterrupt\fP() を廃止予定としている。 代わりに、 \fBsigaction\fP(2) に \fBSA_RESTART\fP フラグを指定して使うことを推奨している。 .SH 関連項目 \fBsignal\fP(2) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部である。 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。