OSDN Git Service

(split) LDP: Update releases based on LDP 3.52 release
[linuxjm/LDP_man-pages.git] / release / man3 / on_exit.3
index d917ca7..7e759ad 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
 .\"
+.\" %%%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.
@@ -19,6 +20,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     Linux libc source code
 .\"     386BSD man pages
 .\" Modified 1993-04-02, David Metcalfe
 .\" Modified 1993-07-25, Rik Faith (faith@cs.unc.edu)
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 1997 Seiichi Yoshida
-.\"       all rights reserved.
-.\" Translated 1997-02-14, Seiichi Yoshida <seiichi@muraoka.info.waseda.ac.jp>
-.\" Updated 2002-09-27, Kentaro Shirakata <argrath@ub32.org>
-.\" Updated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2008-12-26, Akihiro MOTOKI, LDP v3.15
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH ON_EXIT 3  2008-12-05 "GNU" "Linux Programmer's Manual"
-.SH Ì¾Á°
-on_exit \- ¥×¥í¥»¥¹¤¬Àµ¾ï¤Ë½ªÎ»¤·¤¿ºÝ¤Ë¸Æ¤Ð¤ì¤ë´Ø¿ô¤òÅÐÏ¿¤¹¤ë
-.SH ½ñ¼°
+.\"*******************************************************************
+.TH ON_EXIT 3 2008\-12\-05 GNU "Linux Programmer's Manual"
+.SH 名前
+on_exit \- プロセスが正常に終了した際に呼ばれる関数を登録する
+.SH 書式
 .nf
-.B #include <stdlib.h>
+\fB#include <stdlib.h>\fP
 .sp
-.BI "int on_exit(void (*" function ")(int , void *), void *" arg );
+\fBint on_exit(void (*\fP\fIfunction\fP\fB)(int , void *), void *\fP\fIarg\fP\fB);\fP
 .fi
 .sp
 .in -4n
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-.BR on_exit ():
-_BSD_SOURCE || _SVID_SOURCE
-.SH ÀâÌÀ
-.BR on_exit ()
-´Ø¿ô¤Ï¡¢»ØÄꤵ¤ì¤¿´Ø¿ô \fIfunction\fP ¤ò¡¢¥×¥í¥»¥¹¤¬
-Àµ¾ï¤Ë½ªÎ»¤·¤¿ºÝ¤Ë¸Æ¤Ð¤ì¤ë´Ø¿ô¤È¤·¤ÆÅÐÏ¿¤¹¤ë¡£Àµ¾ï¤Ê½ªÎ»¤È¤Ï¡¢
-.BR exit (3)
-¤Þ¤¿¤Ï¥×¥í¥°¥é¥à¤Î \fImain\fP()
-´Ø¿ô¤ÎÃæ¤Î return Ì¿Îá¤Ë¤è¤ë½ªÎ»¤Ç¤¢¤ë¡£
-´Ø¿ô \fIfunction\fP ¤Ë¤Ï¡¢Ä¾¶á¤Î
-.BR exit (3)
-¤Î¸Æ¤Ó½Ð¤·¤ÇÅϤµ¤ì¤¿ status °ú¿ô¤È
-.BR on_exit ()
-¤Î \fIarg\fP °ú¿ô¤¬ÅϤµ¤ì¤ë¡£
+\fBon_exit\fP(): _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+\fBon_exit\fP()  関数は、指定された関数 \fIfunction\fP を、プロセスが
+正常に終了した際に呼ばれる関数として登録する。正常な終了とは、 \fBexit\fP(3)  またはプログラムの \fImain\fP()  関数の中の
+return 命令による終了である。 関数 \fIfunction\fP には、直近の \fBexit\fP(3)  の呼び出しで渡された status 引数と
+\fBon_exit\fP()  の \fIarg\fP 引数が渡される。
 
-Ʊ¤¸´Ø¿ô¤òÊ£¿ô²óÅÐÏ¿¤·¤Æ¤â¤è¤¤¡£
-ÅÐÏ¿¤µ¤ì¤¿´Ø¿ô¤ÏÅÐÏ¿ 1 ²ó¤Ë¤Ä¤­ 1 ²ó¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
+同じ関数を複数回登録してもよい。 登録された関数は登録 1 回につき 1 回呼び出される。
 
-.BR fork (2)
-·Ðͳ¤ÇºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ï¡¢¿Æ¥×¥í¥»¥¹¤ÎÅÐÏ¿¤Î¥³¥Ô¡¼¤ò·Ñ¾µ¤¹¤ë¡£
-.BR exec (3)
-·²¤Î´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¤ËÀ®¸ù¤¹¤ë¤È¡¢Á´¤Æ¤ÎÅÐÏ¿¤¬ºï½ü¤µ¤ì¤ë¡£
-.SH ÊÖ¤êÃÍ
-.BR on_exit ()
-´Ø¿ô¤Ï¡¢À®¸ù¤·¤¿¤é 0 ¤ò¡¢¤½¤¦¤Ç¤Ê¤±¤ì¤Ð 0 °Ê³°¤òÊÖ¤¹¡£
-.SH ½àµò
-¤³¤Î´Ø¿ô¤Ï SunOS 4 Í³Íè¤Ç¤¢¤ë¤¬¡¢libc4, libc5, glibc ¤Ë¤â¸ºß¤¹¤ë¡£
-Solaris (SunOS 5) ¤Ë¤Ï¤â¤Ï¤ä¸ºß¤·¤Ê¤¤¡£
-¤³¤Î´Ø¿ô¤Î»ÈÍѤÏÈò¤±¡¢Âå¤ï¤ê¤Ëɸ½à¤Î
-.BR atexit (3)
-¤ò»È¤¦¤³¤È¡£
-.SH ´ØÏ¢¹àÌÜ
-.BR _exit (2),
-.BR atexit (3),
-.BR exit (3)
+\fBfork\fP(2) で作成された場合、子プロセスは親プロセスの登録のコピーを継承する。
+\fBexec\fP(3) ファミリーの関数の場合、呼び出しに成功すると、 全ての登録が削除される。
+.SH 返り値
+\fBon_exit\fP()  関数は、成功したら 0 を、そうでなければ 0 以外を返す。
+.SH 準拠
+この関数は SunOS 4 由来であるが、libc4, libc5, glibc にも存在する。 Solaris (SunOS 5)
+にはもはや存在しない。 この関数の使用は避け、代わりに標準の \fBatexit\fP(3)  を使うこと。
+.SH 関連項目
+\fB_exit\fP(2), \fBatexit\fP(3), \fBexit\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。