.\" Translated 1998-05-27, Seiiti Obara <SEO@ma1.seikyou.ne.jp>
.\" Updated 2009-02-24, Akihiro MOTOKI, LDP v3.19
.\"
-.\"WORD: stack context ¥¹¥¿¥Ã¥¯¥³¥ó¥Æ¥¥¹¥È
-.\"WORD: signal masks ¥·¥°¥Ê¥ë¥Þ¥¹¥¯
-.\"WORD: signal context ¥·¥°¥Ê¥ë¥³¥ó¥Æ¥¥¹¥È
-.\"WORD: flag ¥Õ¥é¥°
-.\"WORD: low-level Äã¥ì¥Ù¥ë
+.\"WORD: stack context スタックコンテキスト
+.\"WORD: signal masks ã\82·ã\82°ã\83\8aã\83«ã\83\9eã\82¹ã\82¯
+.\"WORD: signal context シグナルコンテキスト
+.\"WORD: flag ã\83\95ã\83©ã\82°
+.\"WORD: low-level 低レベル
.\"
.TH LONGJMP 3 2009-01-13 "" "Linux Programmer's Manual"
.\"O .SH NAME
-.SH ̾Á°
+.SH 名前
.\"O longjmp, siglongjmp \- nonlocal jump to a saved stack context
-longjmp, siglongjmp \- Êݸ¤µ¤ì¤¿¥¹¥¿¥Ã¥¯¥³¥ó¥Æ¥¥¹¥È (stack context)
-¤Ø¤ÎÈó¶É½êŪ¤Ê¥¸¥ã¥ó¥×
+longjmp, siglongjmp \- 保存されたスタックコンテキスト (stack context)
+への非局所的なジャンプ
.\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.SH 書式
.nf
.B #include <setjmp.h>
.in -4n
.\"O Feature Test Macro Requirements for glibc (see
.\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
+glibc 向けの機能検査マクロの要件
.RB ( feature_test_macros (7)
-»²¾È):
+参照):
.in
.sp
.BR siglongjmp ():
_POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_C_SOURCE
.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
.\"O .BR longjmp ()
.\"O and
.\"O .BR setjmp (3)
.\"O .BR longjmp ()
.\"O is invoked with a second argument of 0, 1 will be returned instead.
.BR longjmp ()
-¤È
+と
.BR setjmp (3)
-¤Ï¡¢¥×¥í¥°¥é¥à¤ÎÄã¥ì¥Ù¥ë¤Ê¥µ¥Ö¥ë¡¼¥Á¥ó¤Ë¤ª¤¤¤Æ¡¢
-¥¨¥é¡¼¤ä³ä¤ê¹þ¤ß¤¬È¯À¸¤·¤¿»þ¤Î½èÍý¤ËÊØÍø¤Ç¤¢¤ë¡£
+は、プログラムの低レベルなサブルーチンにおいて、
+エラーや割り込みが発生した時の処理に便利である。
.BR longjmp ()
-¤Ï¡¢\fIenv\fP °ú¤¿ô¤ò»ØÄꤷ¤Æ¸Æ¤Ó½Ð¤µ¤ì¤¿ºÇ¸å¤Î
+は、\fIenv\fP 引き数を指定して呼び出された最後の
.BR setjmp (3)
-¤Ë¤è¤Ã¤ÆÊݸ¤µ¤ì¤¿´Ä¶¤òÉü¸µ¤¹¤ë¡£
+によって保存された環境を復元する。
.BR longjmp ()
-¤Î´°Î»¸å¡¢¥×¥í¥°¥é¥à¤Î¼Â¹Ô¤Ï¡¢¤Þ¤ë¤ÇÂбþ¤¹¤ë
+の完了後、プログラムの実行は、まるで対応する
.BR setjmp (3)
-¤Î¸Æ¤Ó½Ð¤·¤¬ÃÍ \fIval\fP ¤ÇÊ֤äÆÍ褿¤«¤è¤¦¤Ë³¹Ô¤µ¤ì¤ë¡£
+の呼び出しが値 \fIval\fP で返って来たかように続行される。
.BR longjmp ()
-¤Ï 0 ¤òÊÖ¤¹¤è¤¦¤Ë»Ø¼¨¤¹¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡£
-ÆóÈÖÌܤΰú¤¿ô¤Ë 0 ¤ò»ØÄꤷ¤Æ
+は 0 を返すように指示することはできない。
+二番目の引き数に 0 を指定して
.BR longjmp ()
-¤¬¸Æ¤Ð¤ì¤¿¾ì¹ç¤Ï¡¢Âå¤ï¤ê¤Ë 1 ¤¬ÊÖ¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤ë¡£
+が呼ばれた場合は、代わりに 1 が返されることになる。
.P
.\"O .BR siglongjmp ()
.\"O is similar to
.\"O also restores the signal mask that was saved by
.\"O .BR sigsetjmp (3).
.BR siglongjmp ()
-¤Ï¡¢°ú¤¿ô \fIenv\fP ¤Î·¿¤¬°Û¤Ê¤ëÅÀ°Ê³°¤Ï¡¢
+は、引き数 \fIenv\fP の型が異なる点以外は、
.BR longjmp ()
-¤ÈƱÍͤǤ¢¤ë¡£
-\fIenv\fP ¤òÊݸ¤·¤¿
+と同様である。
+\fIenv\fP を保存した
.BR sigsetjmp (3)
-¤¬ 0 °Ê³°¤Î \fIsavesigs\fP ¥Õ¥é¥°¤Ç¸Æ¤Ó½Ð¤µ¤ì¤Æ¤¤¤¿¾ì¹ç¤Ç¡¢
-¤«¤Ä¡¢¤½¤Î¾ì¹ç¤Ë¤Î¤ß¡¢
+が 0 以外の \fIsavesigs\fP フラグで呼び出されていた場合で、
+かつ、その場合にのみ、
.BR siglongjmp (3)
-¤Ï
+は
.BR sigsetjmp (3)
-¤è¤êÊݸ¤µ¤ì¤Æ¤¤¤¿¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤ÎÉü¸µ¤ò¹Ô¤¦¡£
+より保存されていたシグナルマスクの復元を行う。
.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
+.SH 返り値
.\"O These functions never return.
-¤³¤ì¤é¤Î´Ø¿ô¤¬Ê֤뤳¤È¤Ï¤Ê¤¤¡£
+これらの関数が返ることはない。
.\"O .SH "CONFORMING TO"
-.SH ½àµò
+.SH 準拠
.\"O C89, C99, and POSIX.1-2001 specify
.\"O .BR longjmp ().
.\"O POSIX.1-2001 specifies
.\"O .BR siglongjmp ().
.BR longjmp ()
-¤Ï C89, C99, POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
+は C89, C99, POSIX.1-2001 で規定されている。
.BR siglongjmp ()
-¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
+は POSIX.1-2001 で規定されている。
.\"O .SH NOTES
-.SH Ãí°Õ
+.SH 注意
.\"O POSIX does not specify whether
.\"O .BR longjmp ()
.\"O will restore the signal context (see
.\"O .BR sigsetjmp ()
.\"O and
.\"O .BR siglongjmp ().
-POSIX ¤Ç¤Ï¡¢
+POSIX では、
.BR longjmp ()
-¤¬¥·¥°¥Ê¥ë¥³¥ó¥Æ¥¥¹¥È (signal context) ¤òÉü¸µ¤¹¤ë¤«¤É¤¦¤«µ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤
+がシグナルコンテキスト (signal context) を復元するかどうか規定されていない
.RB ( setjmp (3)
-¤Ë¤â¾¯¤·¾Ü¤·¤¤¾ðÊ󤬤¢¤ë)¡£
-°Ü¿¢À¤Î¤¢¤ëÊýË¡¤Ç¡¢¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤òÊݸ¤·Éü¸µ¤µ¤»¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢
+にも少し詳しい情報がある)。
+移植性のある方法で、シグナルマスクを保存し復元させたい場合には、
.BR sigsetjmp (3)
-¤È
+と
.BR siglongjmp ()
-¤ò»È¤¦¤³¤È¡£
+を使うこと。
.P
.\"O The values of automatic variables are unspecified after a call to
.\"O .BR longjmp ()
.\"O if they meet all the following criteria:
-°Ê²¼¤Î¾ò·ï¤¬Á´¤ÆÀ®Î©¤¹¤ë¾ì¹ç¡¢
+以下の条件が全て成立する場合、
.BR longjmp ()
-¤Î¸Æ¤Ó½Ð¤·¤¬¹Ô¤ï¤ì¤¿¸å¤Î¼«Æ°ÊÑ¿ô¤ÎÃͤÏ̤ÄêµÁ (unspecified) ¤È¤Ê¤ë¡£
+の呼び出しが行われた後の自動変数の値は未定義 (unspecified) となる。
.IP \(bu 3
.\"O they are local to the function that made the corresponding
.\"O .BR setjmp (3)
.\"O call;
-¤½¤Î¼«Æ°ÊÑ¿ô¤¬¡¢Âбþ¤¹¤ë
+その自動変数が、対応する
.BR setjmp (3)
-¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿´Ø¿ô¤Î¥í¡¼¥«¥ëÊÑ¿ô¤Ç¤¢¤ë¡£
+呼び出しを行った関数のローカル変数である。
.IP \(bu
.\"O their values are changed between the calls to
.\"O .BR setjmp (3)
.\"O and
.\"O .BR longjmp ();
.\"O and
-¼«Æ°ÊÑ¿ô¤ÎÃͤ¬
+自動変数の値が
.BR setjmp (3)
-¤È
+と
.BR longjmp ()
-¤Î´Ö¤ÇÊѹ¹¤µ¤ì¤Æ¤¤¤ë¡£
+の間で変更されている。
.IP \(bu
.\"O they are not declared as
.\"O .IR volatile .
.I volatile
-¤È¤·¤ÆÀë¸À¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
+として宣言されていない。
.P
.\"O Analogous remarks apply for
.\"O .BR siglongjmp ().
-ƱÍͤÎÃí°Õ¤¬
+同様の注意が
.BR siglongjmp ()
-¤Ë¤â¤¢¤Æ¤Ï¤Þ¤ë¡£
+にもあてはまる。
.P
.\"O .BR longjmp ()
.\"O and
.\"O understand and maintain.
.\"O If possible an alternative should be used.
.BR longjmp ()
-¤ä
+や
.BR siglongjmp ()
-¤ò»È¤¦¤È¡¢¥×¥í¥°¥é¥à¤ÏÍý²ò¤·¤Å¤é¤¯¡¢Êݼ餷¤Ë¤¯¤¤¤â¤Î¤Ë¤Ê¤ë¡£
-Ê̤ÎÊýË¡¤¬²Äǽ¤Ê¤é¡¢¤½¤ì¤ò»È¤¦¤Ù¤¤Ç¤¢¤ë¡£
+を使うと、プログラムは理解しづらく、保守しにくいものになる。
+別の方法が可能なら、それを使うべきである。
.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
+.SH 関連項目
.BR setjmp (3),
.BR sigsetjmp (3)