121 lines
3.8 KiB
Groff
121 lines
3.8 KiB
Groff
.\" Copyright (c) 1980, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)_exit.2 8.1 (Berkeley) 6/4/93
|
|
.\" %FreeBSD: src/lib/libc/sys/_exit.2,v 1.16 2002/12/18 13:33:04 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd June 4, 1993
|
|
.Dt EXIT 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm _exit
|
|
.Nd ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤ò½ªÎ»¤¹¤ë
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In unistd.h
|
|
.Ft void
|
|
.Fn _exit "int status"
|
|
.Sh ²òÀâ
|
|
.Fn _exit
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¥×¥í¥»¥¹¤ò½ªÎ»¤µ¤»¡¢°Ê¹ß¤Î¤è¤¦¤Ê·ë²Ì¤ò¤â¤¿¤é¤·¤Þ¤¹:
|
|
.Bl -bullet
|
|
.It
|
|
¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹Æâ¤Î¤¹¤Ù¤Æ¤Îµ½Ò»Ò¤¬ÊĤ¸¤é¤ì¤Þ¤¹¡£
|
|
¤³¤ì¤Ë¤ÏÃٱ䤬ȼ¤¦¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
|
|
¤¿¤È¤¨¤Ð¡¢½ÐÎϤ¬¤¹¤Ù¤Æ½Ð¤µ¤ì¤Æ¤·¤Þ¤¦¤Î¤òÂÔµ¡¤¹¤ë¤³¤È¤Ç¤¹¡£
|
|
¤³¤Î¾õÂÖ¤Î¥×¥í¥»¥¹¤Ï´û¤Ë»à¤Ë¤«¤±¤Æ¤¤¤ë¤Î¤Ç¡¢¿·¤¿¤Ë kill ¤Ï¤Ç¤¤Þ¤»¤ó¡£
|
|
.It
|
|
¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¿Æ¥×¥í¥»¥¹¤Ë¡¢Ì¤²ò·è¤Î
|
|
.Xr wait 2
|
|
¸Æ¤Ó½Ð¤·¤¬¤¢¤ë¾ì¹ç¤Þ¤¿¤Ï
|
|
.Dv SIGCHLD
|
|
¥·¥°¥Ê¥ë¤òÊ᪤·¤¿¾ì¹ç¡¢¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î½ªÎ»¤¬¿Æ¥×¥í¥»¥¹¤ËÄÌÃΤµ¤ì¡¢
|
|
.Xr wait 2
|
|
¤ÇÄêµÁ¤µ¤ì¤¿¤è¤¦¤Ë
|
|
.Fa status
|
|
¤¬ÀßÄꤵ¤ì¤Þ¤¹¡£
|
|
.It
|
|
¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Ë»Ò¥×¥í¥»¥¹¤¬Â¸ºß¤¹¤ë¤Ê¤é¡¢¤½¤ì¤é¤¹¤Ù¤Æ¤Î»Ò¥×¥í¥»¥¹¤Î
|
|
¿Æ¥×¥í¥»¥¹ ID ¤Ï 1 ¤ËÀßÄꤵ¤ì¤Þ¤¹¡£
|
|
½é´ü²½¥×¥í¥»¥¹
|
|
.Pf ( Xr intro 2
|
|
¤Î
|
|
.Sx ÄêµÁ
|
|
¥»¥¯¥·¥ç¥ó¤ò»²¾È)
|
|
¤¬¡¢¤³¤ì¤é¤Î³Æ¥×¥í¥»¥¹¤ò·Ñ¾µ¤·¤Þ¤¹¡£
|
|
.It
|
|
¥×¥í¥»¥¹¤Î½ªÎ»¤Ë¤è¤Ã¤Æ¤¤¤º¤ì¤«¤Î¥×¥í¥»¥¹¥°¥ë¡¼¥×¤¬¿Æ¤Î¤Ê¤¤»Ò¤Ë¤Ê¤ë¾ì¹ç
|
|
(Ä̾ï¤Ï¥°¥ë¡¼¥×¤Î¥á¥ó¥ÐÁ´°÷¤ËÂФ¹¤ë¿Æ¤¬½ªÎ»¤·¤¿¤¿¤á¡£
|
|
.Xr intro 2
|
|
¤Î
|
|
.Dq ¿Æ¤Î¤Ê¤¤¥×¥í¥»¥¹¥°¥ë¡¼¥× (Orphaned Process Group)
|
|
¤ò»²¾È)¡¢¤½¤·¤Æ¿Æ¤Î¤Ê¤¤¥°¥ë¡¼¥×¤Î¥á¥ó¥Ð¤Î¤¤¤º¤ì¤«¤¬Ää»ß¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
|
|
¤½¤Î¿·¤¿¤Ê¿Æ¤Î¤Ê¤¤¥×¥í¥»¥¹¥°¥ë¡¼¥×¤Î¤¹¤Ù¤Æ¤Î¥á¥ó¥Ð¤Ë
|
|
.Dv SIGHUP
|
|
¥·¥°¥Ê¥ë¤È
|
|
.Dv SIGCONT
|
|
¥·¥°¥Ê¥ë¤¬Á÷¿®¤µ¤ì¤Þ¤¹¡£
|
|
.It
|
|
¥×¥í¥»¥¹¤¬À©¸æ¥×¥í¥»¥¹¤Î¾ì¹ç
|
|
.Pf ( Xr intro 2
|
|
¤ò»²¾È)¡¢
|
|
.Dv SIGHUP
|
|
¥·¥°¥Ê¥ë¤¬À©¸æÃ¼Ëö¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ËÁ÷¿®¤µ¤ì¡¢
|
|
À©¸æÃ¼Ëö¤Ø¤Î¸½ºß¤Î¤¹¤Ù¤Æ¤Î¥¢¥¯¥»¥¹¤¬Ìµ¸ú¤Ë¤µ¤ì¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
¤Û¤È¤ó¤É¤Î C ¥×¥í¥°¥é¥à¤Ï¥é¥¤¥Ö¥é¥ê¥ë¡¼¥Á¥ó
|
|
.Xr exit 3
|
|
¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹¡£
|
|
¤³¤ì¤Ï¥Ð¥Ã¥Õ¥¡¤ò¥Õ¥é¥Ã¥·¥å¤·¡¢¥¹¥È¥ê¡¼¥à¤òÊĤ¸¡¢
|
|
°ì»þ¥Õ¥¡¥¤¥ë¤ò¥¢¥ó¥ê¥ó¥¯¤¹¤ë¤Ê¤É¤·¤¿¸å¤Ë
|
|
.Fn _exit
|
|
¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹¡£
|
|
.Sh Ìá¤êÃÍ
|
|
.Fn _exit
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï·è¤·¤ÆÌá¤ê¤Þ¤»¤ó¡£
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr fork 2 ,
|
|
.Xr sigaction 2 ,
|
|
.Xr wait 2 ,
|
|
.Xr exit 3
|
|
.Sh µ¬³Ê
|
|
.Fn _exit
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
|
|
.St -p1003.1-90
|
|
¤ËŬ¹ç¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.Sh Îò»Ë
|
|
.Fn _exit
|
|
´Ø¿ô¤Ï
|
|
.At v7
|
|
¤ÇÅо줷¤Þ¤·¤¿¡£
|