aboutsummaryrefslogtreecommitdiff
path: root/documentation/manual-pages/ja/man2/setpgid.2
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/manual-pages/ja/man2/setpgid.2')
-rw-r--r--documentation/manual-pages/ja/man2/setpgid.2104
1 files changed, 104 insertions, 0 deletions
diff --git a/documentation/manual-pages/ja/man2/setpgid.2 b/documentation/manual-pages/ja/man2/setpgid.2
new file mode 100644
index 0000000000..28b324304c
--- /dev/null
+++ b/documentation/manual-pages/ja/man2/setpgid.2
@@ -0,0 +1,104 @@
+.\" 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.14 2004/02/08 12:38:30 das Exp %
+.\"
+.\" $FreeBSD$
+.Dd February 8, 2004
+.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
+のプロセスグループを指定された
+.Fa pgrp
+に設定します。
+.Fa pid
+が 0 の場合、呼び出しは現在のプロセスに適用されます。
+.Pp
+影響されるプロセスが実行したプロセスでない場合には、
+それは実行したプロセスの子プロセスでなければならず、既に
+.Xr exec 3
+操作を実行していてはならず、両方のプロセスが同じセッション中に
+なければなりません。
+要求されたプロセスグループ ID は呼び出し側のセッション中に既に存在
+していなければならないか、または目的のプロセス ID と同一でなければなりません。
+.Sh 戻り値
+.Rv -std setpgid
+.Sh エラー
+.Fn setpgid
+システムコールは、次の場合に処理を失敗し、プロセスグループは変更されません:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+要求されたプロセスグループ ID は正当ではありません。
+.It Bq Er ESRCH
+要求されたプロセスが存在しません。
+.It Bq Er ESRCH
+目的のプロセスが、呼び出したプロセスでも、呼び出したプロセスの
+子プロセスでもありません。
+.It Bq Er EACCES
+要求されたプロセスが呼び出したプロセスの子プロセスですが、
+.Xr exec 3
+操作を既に行っています。
+.It Bq Er EPERM
+目的のプロセスがセッションリーダです。
+.It Bq Er EPERM
+要求されたプロセスグループ ID が呼び出し側のセッションの中に無く、
+目的のプロセスのプロセス ID とも等しくありません。
+.El
+.Sh 関連項目
+.Xr getpgrp 2
+.Sh 規格
+.Fn setpgid
+システムコールは
+.St -p1003.1-90
+に適合しています。
+.Sh 互換性
+.Fn setpgrp
+システムコールは、
+.Fn setpgid
+と同一であり、
+.Bx
+の旧バージョンとの呼び出し規約互換のために保持されています。