.\" Copyright (c) 2007 Michael Kerrisk .\" .\" %%%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 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2007-06-02, Akihiro MOTOKI .\" .TH SYSV_SIGNAL 3 2014\-01\-06 "" "Linux Programmer's Manual" .SH 名前 sysv_signal \- System V 方式のシグナル処理 .SH 書式 \fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */ .br \fB#include \fP .sp \fBtypedef void (*sighandler_t)(int);\fP .sp \fBsighandler_t sysv_signal(int \fP\fIsignum\fP\fB, sighandler_t \fP\fIhandler\fP\fB);\fP .SH 説明 \fBsysv_signal\fP() 関数は \fBsignal\fP(2) と同じ引き数をとり、同じ処理を実行する。 しかしながら、 \fBsysv_signal\fP() は System V の信頼性に欠けるシグナル処理方式を提供している。 信頼性に欠けるシグナル処理方式は以下の特徴を持つ。 a) ハンドラーが起動されると、シグナルの処理方法 (disposition) が デフォルトにリセットされる、 b) シグナルハンドラーの実行中は、それ以降に発生した同じシグナルの配送が ブロックされない、 c) ハンドラーが停止中の (blocking している) システムコールを中断した場合、 自動的に再開されないシステムコールがある。 .SH 返り値 \fBsysv_signal\fP() 関数はシグナルハンドラーの直前の値を返す。 エラーの場合、 \fBSIG_ERR\fP を返す。 .SH エラー \fBsignal\fP(2) と同じ。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" \fBsysv_signal\fP() 関数はスレッドセーフである。 .SH 準拠 この関数は非標準である。 .SH 注意 \fBsysv_signal\fP() の使用は避けるべきである。代わりに \fBsigaction\fP(2) を使うこと。 以前の Linux システムでは、 \fBsysv_signal\fP() と \fBsignal\fP(2) は等価であった。しかし、新しめのシステムでは、 \fBsignal\fP(2) は信頼性のあるシグナル処理方式を提供している。 詳細は \fBsignal\fP(2) を参照。 \fIsighandler_t\fP を使っているのは GNU による拡張である。 この型は機能検査マクロ \fB_GNU_SOURCE\fP を定義した場合にのみ定義される。 .SH 関連項目 \fBsigaction\fP(2), \fBsignal\fP(2), \fBbsd_signal\fP(3), \fBsignal\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部である。 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。