.\" Copyright (c) 2007 Michael Kerrisk .\" .\" 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. .\" .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2007-06-02, Akihiro MOTOKI .\" .\"WORD: reliable 信頼性のある .\"WORD: unreliable 信頼性に欠ける .\"WORD: signal semantics シグナル処理方式 .\" .TH SYSV_SIGNAL 3 2007-05-04 "" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O sysv_signal \- signal handling with System V semantics sysv_signal \- System V 方式のシグナル処理 .\"O .SH SYNOPSIS .SH 書式 .\"O .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */" .br .B #include .sp .B typedef void (*sighandler_t)(int); .sp .BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler ); .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR sysv_signal () .\"O function takes the same arguments, and performs the same task, as .\"O .BR signal (2). .BR sysv_signal () 関数は .BR signal (2) と同じ引き数をとり、同じ処理を実行する。 .\"O However .\"O .BR sysv_signal () .\"O provides the System V unreliable signal semantics, that is: .\"O a) the disposition of the signal is reset to the default .\"O when the handler is invoked; .\"O b) delivery of further instances of the signal is not blocked while .\"O the signal handler is executing; and .\"O c) if the handler interrupts (certain) blocking system calls, .\"O then the system call is not automatically restarted. しかしながら、 .BR sysv_signal () は System V の信頼性に欠けるシグナル処理方式を提供している。 信頼性に欠けるシグナル処理方式は以下の特徴を持つ。 a) ハンドラが起動されると、シグナルの処理方法 (disposition) が デフォルトにリセットされる、 b) シグナルハンドラの実行中は、それ以降に発生した同じシグナルの配送が ブロックされない、 c) ハンドラが停止中の (blocking している) システムコールを中断した場合、 自動的に再開されないシステムコールがある。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR sysv_signal () .\"O function returns the previous value of the signal handler, or .\"O .B SIG_ERR .\"O on error. .BR sysv_signal () 関数はシグナルハンドラの直前の値を返す。 エラーの場合、 .B SIG_ERR を返す。 .\"O .SH ERRORS .SH エラー .\"O As for .\"O .BR signal (2). .BR signal (2) と同じ。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O This function is nonstandard. この関数は非標準である。 .\"O .SH NOTES .SH 注意 .\"O Use of .\"O .BR sysv_signal () .\"O should be avoided; use .\"O .BR sigaction (2) .\"O instead. .BR sysv_signal () の使用は避けるべきである。代わりに .BR sigaction (2) を使うこと。 .\"O On older Linux systems, .\"O .BR sysv_signal () .\"O and .\"O .BR signal (2) .\"O were equivalent. .\"O But on newer systems, .\"O .BR signal (2) .\"O provides reliable signal semantics; see .\"O .BR signal (2) .\"O for details. 以前の Linux システムでは、 .BR sysv_signal () と .BR signal (2) は等価であった。しかし、新しめのシステムでは、 .BR signal (2) は信頼性のあるシグナル処理方式を提供している。 詳細は .BR signal (2) を参照。 .\"O The use of .\"O .I sighandler_t .\"O is a GNU extension; .\"O this type is only defined if .\"O this type is only defined if .\"O the .\"O .B _GNU_SOURCE .\"O feature test macro is defined. .I sighandler_t を使っているのは GNU による拡張である。 この型は機能検査マクロ .B _GNU_SOURCE を定義した場合にのみ定義される。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR sigaction (2), .BR signal (2), .BR bsd_signal (3), .BR signal (7)