137 lines
4.5 KiB
Groff
137 lines
4.5 KiB
Groff
.\" %FreeBSD: src/lib/libc/sys/minherit.2,v 1.19 2002/12/18 09:22:31 ru Exp %
|
|
.\"
|
|
.\" Copyright (c) 1991, 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.
|
|
.\"
|
|
.\" @(#)minherit.2 8.1 (Berkeley) 6/9/93
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd February 17, 1996
|
|
.Dt MINHERIT 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm minherit
|
|
.Nd ¥Ú¡¼¥¸¤Î·Ñ¾µ¤òÀ©¸æ¤¹¤ë
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In sys/mman.h
|
|
.Ft int
|
|
.Fn minherit "void *addr" "size_t len" "int inherit"
|
|
.Sh ²òÀâ
|
|
.Fn minherit
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢»ØÄê¤Î¥Ú¡¼¥¸¤¬·Ñ¾µ¤ÎºÝ¤ÎÆÃÀ¤È¤·¤Æ
|
|
.Fa inherit
|
|
¤ò»ý¤Ä¤è¤¦¤ËÊѹ¹¤·¤Þ¤¹¡£
|
|
¤¹¤Ù¤Æ¤Î¼ÂÁõ¤Ë¤ª¤¤¤Æ¡¢·Ñ¾µ¤ÎºÝ¤ÎÆÃÀ¤¬¥Ú¡¼¥¸Ã±°Ì¤ÇÀßÄê¤Ç¤¤ë¤³¤È¤¬
|
|
Êݾڤµ¤ì¤ë¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
|
|
Êѹ¹¤Îñ°Ì¤Ï¥ê¡¼¥¸¥ç¥óÁ´ÂΤ«¤â¤·¤ì¤Þ¤»¤ó¡£
|
|
.Fx
|
|
¤Ï¡¢¥Ú¡¼¥¸Ëè¤Ë·Ñ¾µÆÃÀ¤òÄ´À°¤¹¤ëµ¡Ç½¤ò»ý¤Á¤Þ¤¹¡£
|
|
·Ñ¾µ¤Ï¡¢
|
|
.Fn fork
|
|
¤ÇºîÀ®¤µ¤ì¤¿»Ò¶¡¤ËÂФ·¤Æ¤Î¤ß±Æ¶Á¤·¤Þ¤¹¡£
|
|
.Fn exec
|
|
¤Ë¤Ï±Æ¶Á¤¢¤ê¤Þ¤»¤ó¡£
|
|
exec ¤µ¤ì¤¿¥×¥í¥»¥¹¤Ï¡¢¥¢¥É¥ì¥¹¶õ´ÖÁ´ÂΤòÃÖ¤´¹¤¨¤Þ¤¹¡£
|
|
¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¿Æ¤Î¥¢¥É¥ì¥¹¶õ´Ö¤ËÂФ·¤Æ¤â¤Þ¤¿±Æ¶Á¤¢¤ê¤Þ¤»¤ó
|
|
(¿Æ»Ò¤Ë¤è¤ë¥¢¥É¥ì¥¹¶õ´Ö¤Î¶¦Í¤ÏÀøºßŪ¤Ë¤¢¤êÆÀ¤Þ¤¹¤¬¡¢¤³¤ì¤Ï½ü³°¤·¤Þ¤¹)¡£
|
|
.Pp
|
|
·Ñ¾µ¤ÏÆñ²ò¤Êµ¡Ç½¤Ç¤¢¤ê¡¢¤Û¤È¤ó¤É¤¬
|
|
.Fn mmap
|
|
¤Î
|
|
.Dv MAP_SHARED
|
|
µ¡Ç½¤ÇÃÖ¤´¹¤¨¤é¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
¤·¤«¤·¤Ê¤¬¤é¡¢
|
|
.Fn minherit
|
|
¤ò»ÈÍѤ·¤Æ¡¢
|
|
.Dv MAP_PRIVATE
|
|
¤Ç¥Þ¥Ã¥×¤µ¤ì¤¿¥á¥â¥ê¥Ö¥í¥Ã¥¯¤ò¿Æ»Ò´Ö¤Ç¶¦Í²Äǽ¤Ç¤¹¡£
|
|
¤³¤ì¤Ë¤è¤ê¡¢¿Æ¤â¤·¤¯¤Ï»Ò¤Ë¤è¤ë½¤Àµ¤Ï¶¦Í¤µ¤ì¤Þ¤¹¤¬¡¢
|
|
¸µ¡¹²¼Áؤˤ¢¤ë¥Õ¥¡¥¤¥ë¤ÏÊѹ¹¤µ¤ì¤Þ¤»¤ó¡£
|
|
.Bl -tag -width ".Dv INHERIT_SHARE"
|
|
.It Dv INHERIT_SHARE
|
|
ËÜ¥ª¥×¥·¥ç¥ó¤Ï¡¢ÂоݤΥ¢¥É¥ì¥¹¶õ´Ö¤ò¿Æ»Ò´Ö¤Ç¶¦Í¤µ¤»¤Þ¤¹¡£
|
|
ËÜ¥ª¥×¥·¥ç¥ó¤Ï¡¢
|
|
¸µ¡¹²¼Áؤˤ¢¤ë¥Ð¥Ã¥¥ó¥°¥¹¥È¥¢¤¬¤É¤Î¤è¤¦¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¤«¤Ë¤Ï¡¢±Æ¶Á¤·¤Þ¤»¤ó¡£
|
|
.It Dv INHERIT_NONE
|
|
ËÜ¥ª¥×¥·¥ç¥ó¤Ï¡¢ÂоݤΥ¢¥É¥ì¥¹¶õ´Ö¤Î·Ñ¾µ¤ò´°Á´¤ËËɻߤ·¤Þ¤¹¡£
|
|
Åö³º¥¢¥É¥ì¥¹¶õ´Ö¤Ï»Ò¤ÎÃæ¤Ç¤Ï¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¤Þ¤¹¡£
|
|
.It Dv INHERIT_COPY
|
|
ËÜ¥ª¥×¥·¥ç¥ó¤Ï¡¢¥¢¥É¥ì¥¹¶õ´Ö¤ò»Ò¤ËÂФ·¥³¥Ô¡¼¥ª¥ó¥é¥¤¥È¤Ç·Ñ¾µ¤µ¤»¤Þ¤¹¡£
|
|
ËÜ¥ª¥×¥·¥ç¥ó¤Ë¤ÏÉÔ¹¬¤ÊÉûºîÍѤ¬¤¢¤ê¡¢
|
|
¿Æ¤¬ fork ¤¹¤ë¤È¤¤Ë¥¢¥É¥ì¥¹¶õ´Ö¤¬¥³¥Ô¡¼¥ª¥ó¥é¥¤¥È¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
|
|
¸µ¡¹¤Î¥Þ¥Ã¥Ô¥ó¥°¤¬
|
|
.Dv MAP_SHARED
|
|
¤Î¾ì¹ç¡¢
|
|
¿Æ¤¬ fork ¤·¤¿¸å¤Ë¤Ï¤³¤ì¤Ï¿Æ¤Ë¤ª¤¤¤Æ¤Ï¶¦Í¤µ¤ì¤Þ¤»¤ó¡£
|
|
¤Þ¤¿¡¢¸µ¤Î¶¦Í¥Ð¥Ã¥¥ó¥°¥¹¥È¥¢¥Þ¥Ã¥Ô¥ó¥°¤Ï¡¢
|
|
¿Æ¤Ë¤ª¤¤¤Æ¥¢¥ó¥Þ¥Ã¥×¤·¤ÆºÆ¥Þ¥Ã¥×¤¹¤ë°Ê³°¤Ë²óÉü¤·¤è¤¦¤¬¤¢¤ê¤Þ¤»¤ó¡£
|
|
.El
|
|
.Sh Ìá¤êÃÍ
|
|
.Rv -std minherit
|
|
.Sh ¥¨¥é¡¼
|
|
.Fn minherit
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¼¡¤Î¾ì¹ç¤Ë½èÍý¤ò¼ºÇÔ¤·¤Þ¤¹:
|
|
.Bl -tag -width Er
|
|
.It Bq Er EINVAL
|
|
.Fa addr
|
|
°ú¿ô¤È
|
|
.Fa len
|
|
°ú¿ô¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤ë²¾ÁÛ¥¢¥É¥ì¥¹ÈϰϤ¬Í¸ú¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
|
|
.It Bq Er EACCES
|
|
.Fa inherit
|
|
°ú¿ô¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤ë¥Õ¥é¥°¤¬¡¢
|
|
.Fa addr
|
|
°ú¿ô¤È
|
|
.Fa len
|
|
°ú¿ô¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤¿¥Ú¡¼¥¸¤ËÂФ·¤ÆÅ¬ÀڤǤϤ¢¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£
|
|
.El
|
|
.Sh ¥Ð¥°
|
|
°ìÅÙ
|
|
.Dv MAP_PRIVATE
|
|
¤â¤·¤¯¤Ï
|
|
.Dv MAP_SHARED
|
|
¤·¤Æ¤¤¤ë¤â¤Î¤Ë·Ñ¾µ¤òÀßÄꤹ¤ë¤È¡¢Îΰè¤ò¥¢¥ó¥Þ¥Ã¥×¤·¤ÆºÆ¥Þ¥Ã¥×¤¹¤ë°Ê³°¤Ë
|
|
¤â¤È¤â¤È¤Î¥³¥Ô¡¼¥ª¥ó¥é¥¤¥È¤Î°ÕÌ£¤ò²óÉü¤µ¤»¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr fork 2 ,
|
|
.Xr madvise 2 ,
|
|
.Xr mincore 2 ,
|
|
.Xr mprotect 2 ,
|
|
.Xr msync 2 ,
|
|
.Xr munmap 2 ,
|
|
.Xr rfork 2
|
|
.Sh Îò»Ë
|
|
.Fn minherit
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
|
|
.Ox
|
|
¤Ç¤Ï¤¸¤á¤ÆÅо줷¤Þ¤·¤¿¡£
|