OSDN Git Service

0003fe086c91201e029961a60173bd3ccf3975d8
[linuxjm/LDP_man-pages.git] / draft / man2 / sigreturn.2
1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
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 .\" Created   Sat Aug 21 1995     Thomas K. Dyas <tdyas@eden.rutgers.edu>
24 .\" Modified Tue Oct 22 22:09:03 1996 by Eric S. Raymond <esr@thyrsus.com>
25 .\"
26 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
27 .\"         all rights reserved.
28 .\" Translated 1997-03-03, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
29 .\" Updated 2005-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
30 .\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
31 .\"
32 .\"WORD:        signal                  シグナル
33 .\"WORD:        signal handler          シグナル・ハンドラ
34 .\"WORD:        stack frame             スタック・フレーム
35 .\"WORD:        kernel                  カーネル
36 .\"WORD:        interrupt               割り込み
37 .\"WORD:        architecture            アーキテクチャ
38 .\"
39 .TH SIGRETURN 2 2008-06-26 "Linux" "Linux Programmer's Manual"
40 .\"O .SH NAME
41 .SH 名前
42 .\"O sigreturn \- return from signal handler and cleanup stack frame
43 sigreturn \- シグナル・ハンドラから返り、スタックを掃除する
44 .\"O .SH SYNOPSIS
45 .SH 書式
46 .BI "int sigreturn(unsigned long " __unused );
47 .\"O .SH DESCRIPTION
48 .SH 説明
49 .\"O When the Linux kernel creates the stack frame for a signal handler, a
50 .\"O call to
51 .\"O .BR sigreturn ()
52 .\"O is inserted into the stack frame so that upon
53 .\"O return from the signal handler,
54 .\"O .BR sigreturn ()
55 .\"O will be called.
56 Linux カーネルは、
57 シグナル・ハンドラ用にスタック・フレームを作成する際、
58 .BR sigreturn ()
59 をスタック・フレームに挿入し、シグナル・ハンドラが返るときに
60 .BR sigreturn ()
61 が呼ばれるようにする。
62
63 .\"O This
64 .\"O .BR sigreturn ()
65 .\"O call undoes everything that was
66 .\"O done\(emchanging the process's signal mask, switching stacks (see
67 .\"O .BR sigaltstack "(2))\(emin "
68 .\"O order to invoke the signal handler:
69 .\"O it restores the process's signal mask, switches stacks,
70 .\"O and restores the process's context (registers, processor flags),
71 .\"O so that the process directly resumes execution
72 .\"O at the point where it was interrupted by the signal.
73 .BR sigreturn ()
74 は、シグナル・ハンドラを起動するために行ったことの全て \(em
75 プロセスのシグナルマスクの変更、スタックの切り替え
76 .RB ( sigaltstack (2)
77 参照) \(em の取り消しを行う。
78 プロセスのシグナルマスクの復元、スタックの切り替え、
79 プロセスのコンテキスト (レジスタ、プロセッサ・フラグ) の復元を行い、
80 プロセスがシグナルにより割り込まれた場所からそのまま実行を
81 再開できるようにする。
82 .\"O .SH "RETURN VALUE"
83 .SH 返り値
84 .\"O .BR sigreturn ()
85 .\"O never returns.
86 .BR sigreturn ()
87 が返ることはない。
88 .\"O .SH FILES
89 .SH ファイル
90 /usr/src/linux/arch/i386/kernel/signal.c
91 .br
92 /usr/src/linux/arch/alpha/kernel/entry.S
93 .\"O .SH "CONFORMING TO"
94 .SH 準拠
95 .\"O .BR sigreturn ()
96 .\"O is specific to Linux and should not be used in programs intended to be
97 .\"O portable.
98 .BR sigreturn ()
99 は Linux 特有であり、移植を意図したプログラムでは使用してはいけない。
100 .\"O .SH NOTES
101 .SH 注意
102 .\"O The
103 .\"O .BR sigreturn ()
104 .\"O call is used by the kernel to implement signal handlers.
105 .\"O It should
106 .\"O .B never
107 .\"O be called directly.
108 .\"O Better yet, the specific use of the
109 .\"O .I __unused
110 .\"O argument varies depending on the architecture.
111 .BR sigreturn ()
112 コールは、シグナル・ハンドラを実装するためにカーネルにより使用される。
113 これを直接呼び出しては
114 .B 決して
115 いけない。さらに
116 .I __unused
117 引き数がどのように使われるかはそのアーキテクチャに依存して変化する。
118 .\"O .SH "SEE ALSO"
119 .SH 関連項目
120 .BR kill (2),
121 .BR sigaltstack (2),
122 .BR signal (2),
123 .BR signal (7)