.\" Copyright (C) 2002 Andries Brouwer .\" .\" %%%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 replaces an earlier man page written by Walter Harms .\" . .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI, all rights reserved. .\" Translated Mon Feb 2 2003 by Akihiro MOTOKI .\" .TH GSIGNAL 3 2007\-07\-26 "" "Linux Programmer's Manual" .SH 名前 gsignal, ssignal \- ソフトウェアシグナル機能 .SH 書式 .nf \fB#include \fP .sp \fBtypedef void (*sighandler_t)(int);\fP .sp \fBint gsignal(int \fP\fIsignum\fP\fB);\fP .sp \fBsighandler_t ssignal(int \fP\fIsignum\fP\fB, sighandler_t \fP\fIaction\fP\fB);\fP .fi .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBgsignal\fP(), \fBssignal\fP(): _SVID_SOURCE .SH 説明 Linux ではこれらの関数を使用しないこと。 過去に間違いがあり、Linux では \fBgsignal\fP() と \fBssignal\fP() はそれぞれ \fBraise\fP(3) と \fBsignal\fP(2) の別名になっている。 .LP 一方、System V 風のシステムでは、これらの関数で、 従来の \fBsignal\fP(2) や \fBkill\fP(2) の関数群とは完全に独立な、 ソフトウェアシグナリングを実現している。 \fBssignal\fP() 関数は、番号 \fIsignum\fP のソフトウェアシグナルが \fBgsignal\fP() 関数を使って発生された時にとるべきアクションを定義する。 \fBgsignal\fP() の返り値は、一つ前に指定されていたアクション、もしくは \fBSIG_DFL\fP である。 \fBgsignal\fP() は以下のような動作を行う: \fIsignum\fP に対してアクションが指定されていないか、アクション \fBSIG_DFL\fP が指定されていた場合、何もせずに 0 を返す。 \fIsignum\fP に対して アクション \fBSIG_IGN\fP が指定されていた場合、何もせずに 1 を返す。 それ以外の場合、アクションを \fBSIG_DFL\fP にリセットし、引き数に \fIsignum\fP を指定してアクション関数を呼び出して、アクション関数の返り値を返す。 \fIsignum\fP がとり得る値の範囲は実装により異なる (多くの場合 1〜15 か 1〜17 である)。 .SH 準拠 これらの関数は、AIX, DG/UX, HP\-UX, SCO, Solaris, Tru64 で使用可能である。 これらのシステムのほとんどで廃止されたことになっており、 Linux の libc および glibc では正しく実装されていない。 \fBgsignal_r\fP() と \fBssignal_r\fP() が実装されているシステムもある。 .SH 関連項目 \fBkill\fP(2), \fBsignal\fP(2), \fBraise\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部である。 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。