89 lines
3.1 KiB
Groff
89 lines
3.1 KiB
Groff
.\" Copyright (c) 1980, 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.
|
|
.\"
|
|
.\" @(#)setpgid.2 8.1 (Berkeley) 6/4/93
|
|
.\" %FreeBSD: src/lib/libc/sys/setpgid.2,v 1.12 2001/10/01 16:09:02 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd June 4, 1993
|
|
.Dt SETPGID 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm setpgid ,
|
|
.Nm setpgrp
|
|
.Nd ¥×¥í¥»¥¹¥°¥ë¡¼¥×¤òÀßÄꤹ¤ë
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In unistd.h
|
|
.Ft int
|
|
.Fn setpgid "pid_t pid" "pid_t pgrp"
|
|
.Ft int
|
|
.Fn setpgrp "pid_t pid" "pid_t pgrp"
|
|
.Sh ²òÀâ
|
|
.Fn setpgid
|
|
¤Ï¡¢»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹
|
|
.Fa pid
|
|
¤Î¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ò»ØÄꤵ¤ì¤¿
|
|
.Ar pgrp
|
|
¤ËÀßÄꤷ¤Þ¤¹¡£
|
|
.Fa pid
|
|
¤¬ 0 ¤Î¾ì¹ç¡¢¸Æ¤Ó½Ð¤·¤Ï¸½ºß¤Î¥×¥í¥»¥¹¤ËŬÍѤµ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
¸Æ¤Ó½Ð¤·Â¦¤¬¥¹¡¼¥Ñ¥æ¡¼¥¶¤Ç¤Ê¤¤¾ì¹ç¡¢±Æ¶Á¤ò¼õ¤±¤ë¥×¥í¥»¥¹¤Ï¡¢
|
|
¸Æ¤Ó½Ð¤·Â¦¤ÈƱ¤¸¼Â¸ú¥æ¡¼¥¶ ID ¤ò»ý¤Ã¤Æ¤¤¤ë¤«¡¢
|
|
¤Þ¤¿¤Ï¸Æ¤Ó½Ð¤·Â¦¥×¥í¥»¥¹¤Î»Ò¹¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|
|
.Sh Ìá¤êÃÍ
|
|
.Rv -std setpgid
|
|
.Sh ¥¨¥é¡¼
|
|
.Fn setpgid
|
|
¤Ï¡¢¼¡¤Î¾ì¹ç¤Ë½èÍý¤ò¼ºÇÔ¤·¡¢¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ÏÊѹ¹¤µ¤ì¤Þ¤»¤ó:
|
|
.Bl -tag -width Er
|
|
.It Bq Er ESRCH
|
|
Í׵ᤵ¤ì¤¿¥×¥í¥»¥¹¤¬Â¸ºß¤·¤Þ¤»¤ó¡£
|
|
.It Bq Er EPERM
|
|
Í׵ᤵ¤ì¤¿¥×¥í¥»¥¹¤Î¼Â¸ú¥æ¡¼¥¶ ID ¤Ï¸Æ¤Ó½Ð¤·Â¦¤Î¼Â¸ú¥æ¡¼¥¶ ID ¤È
|
|
°Û¤Ê¤Ã¤Æ¤ª¤ê¡¢¥×¥í¥»¥¹¤Ï¸Æ¤Ó½Ð¤·Â¦¥×¥í¥»¥¹¤Î»Ò¹¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr getpgrp 2
|
|
.Sh µ¬³Ê
|
|
.Fn setpgid
|
|
´Ø¿ô¸Æ¤Ó½Ð¤·¤Ï
|
|
.St -p1003.1-90
|
|
¤ËŬ¹ç¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.Sh ¸ß´¹À
|
|
.Fn setpgrp
|
|
¤Ï¡¢
|
|
.Fn setpgid
|
|
¤ÈƱ°ì¤Ç¤¢¤ê¡¢
|
|
.Bx
|
|
¤Îµì¥Ð¡¼¥¸¥ç¥ó¤È¤Î¸Æ¤Ó½Ð¤·µ¬Ìó¸ß´¹¤Î¤¿¤á¤ËÊÝ»ý¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|