X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=draft%2Fman2%2F_exit.2;h=e7077f4a88f560a19ea889286d7c92668c520e53;hb=40274b7d79d419993de4a745e3ae86ca6d0f417f;hp=24fb861ed789492c5375e6e06dfcf3ec2b4f1640;hpb=bcfecc3e25568f32773ce254ce4a3a11fa9ea519;p=linuxjm%2FLDP_man-pages.git diff --git a/draft/man2/_exit.2 b/draft/man2/_exit.2 index 24fb861e..e7077f4a 100644 --- a/draft/man2/_exit.2 +++ b/draft/man2/_exit.2 @@ -1,8 +1,7 @@ -.\" Hey Emacs! This file is -*- nroff -*- source. -.\" .\" This manpage is Copyright (C) 1992 Drew Eckhardt; -.\" 1993 Michael Haardt, Ian Jackson. +.\" and Copyright (C) 1993 Michael Haardt, Ian Jackson. .\" +.\" %%%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. @@ -22,10 +21,17 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END .\" .\" Modified Wed Jul 21 23:02:38 1993 by Rik Faith .\" Modified 2001-11-17, aeb .\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.\" .\" Japanese Version Copyright (c) 1997 KUNIMOTO Yasuhiro, all rights reserved. .\" Translated Jun 27, 1997 by KUNIMOTO Yasuhiro (hiro@kthree.co.jp) .\" Modified Jun 28, 1997 by Yoshiki Sugiura (yox@in.aix.or.jp) @@ -35,182 +41,61 @@ .\" Updated Sat Sep 3 04:26:00 JST 2005 .\" by Akihiro MOTOKI .\" -.\"WORD descriptors ¥Ç¥£¥¹¥¯¥ê¥×¥¿ -.\" -.TH _EXIT 2 2010-09-20 "Linux" "Linux Programmer's Manual" -.\"O .SH NAME -.SH ̾Á° -.\"O _exit, _Exit \- terminate the calling process -_exit, _Exit \- ¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤ò½ªÎ»¤µ¤»¤ë -.\"O .SH SYNOPSIS -.SH ½ñ¼° -.B #include +.TH _EXIT 2 2010\-09\-20 Linux "Linux Programmer's Manual" +.SH 名前 +_exit, _Exit \- 呼び出し元のプロセスを終了させる +.SH 書式 +\fB#include \fP .sp -.BI "void _exit(int " status ); +\fBvoid _exit(int \fP\fIstatus\fP\fB);\fP .sp -.B #include +\fB#include \fP .sp -.BI "void _Exit(int " status ); +\fBvoid _Exit(int \fP\fIstatus\fP\fB);\fP .sp .in -4n -.\"O Feature Test Macro Requirements for glibc (see -.\"O .BR feature_test_macros (7)): -glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï -.RB ( feature_test_macros (7) -»²¾È): +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l -.BR _Exit (): +\fB_Exit\fP(): .RS 4 -_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || -_POSIX_C_SOURCE\ >=\ 200112L; +_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br -.\"O or -¤Þ¤¿¤Ï -.I cc\ -std=c99 +または \fIcc\ \-std=c99\fP +.RE .ad -.\"O .SH DESCRIPTION -.SH ÀâÌÀ -.\"O The function -.\"O .BR _exit () -.\"O terminates the calling process "immediately". -.\"O Any open file descriptors -.\"O belonging to the process are closed; any children of the process are -.\"O inherited by process 1, -.\"O .IR init , -.\"O and the process's parent is sent a -.\"O .B SIGCHLD -.\"O signal. -.BR _exit () -¤Ï¡¢¤½¤ì¤ò¸Æ¤ó¤À¥×¥í¥»¥¹¤ò¡Öľ¤Á¤Ë¡×½ªÎ»¤µ¤»¤ë¡£ -¤½¤ÎºÝ¡¢¤³¤Î¥×¥í¥»¥¹¤¬½êÍ­¤·¤Æ¤¤¤ë¥Ç¥£¥¹¥¯¥ê¥×¥¿ (descriptor) ¤Ç¡¢ -¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¤â¤Î¤ÏÁ´¤Æ¥¯¥í¡¼¥º¤µ¤ì¤ë¡£ -¤Þ¤¿¡¢¤³¤Î¥×¥í¥»¥¹¤¬½êÍ­¤¹¤ë»Ò¥×¥í¥»¥¹¤ÏÁ´¤Æ¡¢¥×¥í¥»¥¹ÈÖ¹æ 1¡¢ -¤Ä¤Þ¤ê -.I init -¥×¥í¥»¥¹¤Ë¤è¤Ã¤Æ·Ñ¾µ¤µ¤ì¡¢¤³¤Î¥×¥í¥»¥¹¤Î¿Æ¥×¥í¥»¥¹¤ËÂФ·¤Æ -.B SIGCHLD -¥·¥°¥Ê¥ë¤¬Á÷½Ð¤µ¤ì¤ë¡£ +.SH 説明 +\fB_exit\fP() は、それを呼んだプロセスを「直ちに」終了させる。 その際、このプロセスが所有しているディスクリプタ (descriptor) +で、 オープンされているものは全てクローズされる。 また、このプロセスが所有する子プロセスは全て、プロセス番号 1、 つまり \fIinit\fP +プロセスによって継承され、このプロセスの親プロセスに対して \fBSIGCHLD\fP シグナルが送出される。 .LP -.\"O The value -.\"O .I status -.\"O is returned to the parent process as the process's exit status, and -.\"O can be collected using one of the -.\"O .BR wait 2() -.\"O family of calls. -.I status -¤ÎÃͤϡ¢¤³¤Î¥×¥í¥»¥¹¤Î½ªÎ»¾õÂ֤Ȥ·¤Æ¤½¤Î¿Æ¥×¥í¥»¥¹¤ËÂФ·¤ÆÊÖ¤µ¤ì¡¢ -.BR wait (2) -·Ï´Ø¿ô¤òÍøÍѤ¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¼èÆÀ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ +\fIstatus\fP の値は、このプロセスの終了状態としてその親プロセスに対して返され、 \fBwait\fP(2) +系関数を利用することによって取得することができる。 .LP -.\"O The function -.\"O .BR _Exit () -.\"O is equivalent to -.\"O .BR _exit (). -´Ø¿ô -.BR _Exit () -¤Ï -.BR _exit () -¤ÈÅù²Á¤Ç¤¢¤ë¡£ -.\"O .SH "RETURN VALUE" -.SH ÊÖ¤êÃÍ -.\"O These functions do not return. -¤³¤ì¤é¤Î´Ø¿ô¤ÏÃͤòÊÖ¤µ¤Ê¤¤¡£ -.\"O .SH "CONFORMING TO" -.SH ½àµò -SVr4, POSIX.1-2001, 4.3BSD. -.\"O The function -.\"O .BR _Exit () -.\"O was introduced by C99. -´Ø¿ô -.BR _Exit () -¤Ï C99 ¤ÇƳÆþ¤µ¤ì¤¿¡£ -.\"O .SH NOTES -.SH Ãí°Õ -.\"O For a discussion on the effects of an exit, the transmission of -.\"O exit status, zombie processes, signals sent, etc., see -.\"O .BR exit (3). -exit ¤ÎÌò³ä¡¦½ªÎ»¾õÂ֤μõÅϤ·¡¦ -¥¾¥ó¥Ó¥×¥í¥»¥¹¡¦¥·¥°¥Ê¥ëÁ÷½Ð¤Ê¤É¤Ë¤Ä¤¤¤Æ¤ÎµÄÏÀ¤Ï¡¢ -.BR exit (3) -¤ò»²¾È¤¹¤ë¤³¤È¡£ +関数 \fB_Exit\fP() は \fB_exit\fP() と等価である。 +.SH 返り値 +これらの関数は値を返さない。 +.SH 準拠 +SVr4, POSIX.1\-2001, 4.3BSD. 関数 \fB_Exit\fP() は C99 で導入された。 +.SH 注意 +exit の効果、終了状態の受渡し、ゾンビプロセス、シグナル送出などに +ついての議論は、 \fBexit\fP(3) を参照すること。 .LP -.\"O The function -.\"O .BR _exit () -.\"O is like -.\"O .BR exit (3), -.\"O but does not call any -.\"O functions registered with -.\"O .BR atexit (3) -.\"O or -.\"O .BR on_exit (3). -.\"O Whether it flushes -.\"O standard I/O buffers and removes temporary files created with -.\"O .BR tmpfile (3) -.\"O is implementation-dependent. -´Ø¿ô -.BR _exit () -¤Ï -.BR exit (3) -¤Ë»÷¤Æ¤¤¤ë¤¬¡¢ANSI C ¤Î -.BR atexit (3) -¤ä -.BR on_exit (3) -¤Ë¤è¤Ã¤ÆÅÐÏ¿¤µ¤ì¤¿¤¤¤«¤Ê¤ë´Ø¿ô¤â¸Æ¤Ó½Ð¤µ¤Ê¤¤¡£ -ɸ½à I/O ¥Ð¥Ã¥Õ¥¡¤Î¥Õ¥é¥Ã¥·¥å¤ä¡¢ -.BR tmpfile (3) -¤ÇºîÀ®¤µ¤ì¤¿¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Îºï½ü¤ò¹Ô¤¦¤«¤É¤¦¤«¤Ï¡¢¼ÂÁõ¤Ë°Í¸¤¹¤ë¡£ -.\"O On the other hand, -.\"O .BR _exit () -.\"O does close open file descriptors, and this may cause an unknown delay, -.\"O waiting for pending output to finish. -.\"O If the delay is undesired, -.\"O it may be useful to call functions like -.\"O .BR tcflush (3) -.\"O before calling -.\"O .BR _exit (). -.\"O Whether any pending I/O is canceled, and which pending I/O may be -.\"O canceled upon -.\"O .BR _exit (), -.\"O is implementation-dependent. -°ìÊý¤Ç¡¢ -.BR _exit () -¤Ï¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤ò¥¯¥í¡¼¥º¤·¤Ê¤¤¤¿¤á¡¢ -̤·èÄê¤Ë¤Ê¤Ã¤Æ¤¤¤ë½ÐÎϤ¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¤ë¤Î¤òÂԤĤΤËÉÔ³ÎÄê¤ÊÃ٤줬ȯÀ¸¤¹¤ë¡£ -¤³¤ÎÃÙ¤ì¤òȯÀ¸¤µ¤»¤¿¤¯¤Ê¤±¤ì¤Ð¡¢ -.BR _exit () -¤ÎÁ°¤Ë -.BR tcflush (3) -¤Î¤è¤¦¤Ê´Ø¿ô¤ò¸Æ¤Ó½Ð¤»¤Ð¤è¤¤¡£ -.BR _exit () -¤¬¸Æ¤Ó½Ð¤µ¤ì¤¿¤È¤­¤Ë¡¢ -̤·èÄê¤Ë¤Ê¤Ã¤Æ¤¤¤ëÁ´¤Æ¤Î I/O ¤¬¥­¥ã¥ó¥»¥ë¤µ¤ì¤ë¤Î¤«¡¢ -¤Þ¤¿¤É¤Î I/O ¤¬¥­¥ã¥ó¥»¥ë¤µ¤ì¤ë¤Î¤«¤Ï¼ÂÁõ¤Ë°Í¸¤¹¤ë¡£ +関数 \fB_exit\fP() は \fBexit\fP(3) に似ているが、ANSI C の \fBatexit\fP(3) や \fBon_exit\fP(3) +によって登録されたいかなる関数も呼び出さない。 標準 I/O バッファのフラッシュや、 \fBtmpfile\fP(3) +で作成されたテンポラリファイルの削除を行うかどうかは、実装に依存する。 一方で、 \fB_exit\fP() +はオープンされているファイルディスクリプタをクローズしないため、 未決定になっている出力がフラッシュされるのを待つのに不確定な遅れが発生する。 +この遅れを発生させたくなければ、 \fB_exit\fP() の前に \fBtcflush\fP(3) のような関数を呼び出せばよい。 \fB_exit\fP() +が呼び出されたときに、 未決定になっている全ての I/O がキャンセルされるのか、 またどの I/O がキャンセルされるのかは実装に依存する。 -.\"O In glibc up to version 2.3, the -.\"O .BR _exit () -.\"O wrapper function invoked the kernel system call of the same name. -.\"O Since glibc 2.3, the wrapper function invokes -.\"O .BR exit_group (2), -.\"O in order to terminate all of the threads in a process. -¥Ð¡¼¥¸¥ç¥ó 2.3 ¤è¤êÁ°¤Î glibc ¤Ç¤Ï¡¢ -.BR _exit () -¤Î¥é¥Ã¥Ñ¡¼´Ø¿ô¤ÏƱ¤¸Ì¾Á°¤Î¥«¡¼¥Í¥ë¡¦¥·¥¹¥Æ¥à¥³¡¼¥ë¤òµ¯Æ°¤·¤Æ¤¤¤¿¡£ -glibc 2.3 °Ê¹ß¤Ç¤Ï¡¢¥×¥í¥»¥¹Æâ¤ÎÁ´¤Æ¤Î¥¹¥ì¥Ã¥É¤ò½ªÎ»¤¹¤ë¤¿¤á¤Ë¡¢ -¥é¥Ã¥Ñ¡¼´Ø¿ô¤Ï -.BR exit_group (2) -¤òµ¯Æ°¤¹¤ë¡£ -.\"O .SH "SEE ALSO" -.SH ´ØÏ¢¹àÌÜ -.BR execve (2), -.BR exit_group (2), -.BR fork (2), -.BR kill (2), -.BR wait (2), -.BR wait4 (2), -.BR waitpid (2), -.BR atexit (3), -.BR exit (3), -.BR on_exit (3), -.BR termios (3) +バージョン 2.3 より前の glibc では、 \fB_exit\fP() のラッパー関数は同じ名前のカーネル・システムコールを起動していた。 glibc +2.3 以降では、プロセス内の全てのスレッドを終了するために、 ラッパー関数は \fBexit_group\fP(2) を起動する。 +.SH 関連項目 +\fBexecve\fP(2), \fBexit_group\fP(2), \fBfork\fP(2), \fBkill\fP(2), \fBwait\fP(2), +\fBwait4\fP(2), \fBwaitpid\fP(2), \fBatexit\fP(3), \fBexit\fP(3), \fBon_exit\fP(3), +\fBtermios\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。