.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH SETPGID 2 2013\-07\-31 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 1997-1999 HANATAKA Shinya
+.\" all rights reserved.
+.\" Translated Sun Nov 21 18:54:10 JST 1999
+.\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated Fri Feb 7 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated Sun Feb 23 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2007-09-25, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
+.\" Updated 2010-04-23, Akihiro MOTOKI, LDP v3.24
+.\"
+.TH SETPGID 2 2014\-01\-07 Linux "Linux Programmer's Manual"
.SH 名前
setpgid, getpgid, setpgrp, getpgrp \- プロセスグループの設定/取得を行う
.SH 書式
.nf
_SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+.br
+ || /* glibc 2.19 以降: */ _BSD_SOURCE
.fi
.sp
-\fBsetpgrp\fP()\ (BSD), \fBgetpgrp\fP()\ (BSD):
+\fBsetpgrp\fP()\ (BSD), \fBgetpgrp\fP()\ (BSD) [glibc 2.19 より前]:
.nf
_BSD_SOURCE &&
!\ (_POSIX_SOURCE || _POSIX_C_SOURCE || _XOPEN_SOURCE ||
System V バージョンの \fBsetpgrp\fP() は引き数を一つもとらず、 \fIsetpgid(0,\ 0)\fP と等価である。
+BSD 仕様の \fBsetpgrp\fP() は \fIpid\fP と \fIpgid\fP を引き数にとり、 以下を呼び出すラッパー関数である。
+
+ setpgid(pid, pgid)
+
.\" The true BSD setpgrp() system call differs in allowing the PGID
.\" to be set to arbitrary values, rather than being restricted to
.\" PGIDs in the same session.
-BSD 仕様の \fBsetpgrp\fP() は \fIpid\fP と \fIpgid\fP を引き数にとり、 \fIsetpgid(pid, pgid)\fP
-と等価である。
+glibc 2.19 以降、 BSD 固有の \fBsetpgrp\fP() 関数はもはや \fI<unistd.h>\fP では公開されない。
+この関数の呼び出しは上記の \fBsetpgid\fP() の呼び出しで置き換えるべきである。
+
+BSD 仕様の \fBgetpgrp\fP() は \fIpid\fP だけを引き数にとり、 以下を呼び出すラッパー関数である。
+
+ getpgid(pid)
-BSD 仕様の \fBgetpgrp\fP() は \fIpid\fP だけを引き数にとり、 \fIgetpgid(pid)\fP と等価である。
+glibc 2.19 以降、 BSD 固有の \fBgetpgrp\fP() 関数はもはや \fI<unistd.h>\fP では公開されない。
+この関数の呼び出しは、引き数を取らない POSIX.1 の \fBgetpgrp\fP() の呼び出し (呼び出し元の PGID
+を取得する目的の場合)、もしくは上記の \fBgetpgid\fP() の呼び出しで置き換えるべきである。
.SH 返り値
\fBsetpgid\fP() と \fBsetpgrp\fP() は成功した場合、ゼロを返す。エラーの場合は \-1 を返し、 \fIerrno\fP
が適切に設定される。
各プロセスグループはセッションのメンバーであり、各プロセスは そのプロセスグループが所属しているセッションのメンバーである。
-A session can have a controlling terminal. At any time, one (and only one)
-of the process groups in the session can be the foreground process group for
-the terminal; the remaining process groups are in the background. If a
-signal is generated from the terminal (e.g., typing the interrupt key to
-generate \fBSIGINT\fP), that signal is sent to the foreground process group.
-(See \fBtermios\fP(3) for a description of the characters that generate
-signals.) Only the foreground process group may \fBread\fP(2) from the
-terminal; if a background process group tries to \fBread\fP(2) from the
-terminal, then the group is sent a \fBSIGTTIN\fP signal, which suspends it.
-The \fBtcgetpgrp\fP(3) and \fBtcsetpgrp\fP(3) functions are used to get/set the
-foreground process group of the controlling terminal.
+セッションは制御端末 (controlling terminal) を持つことができる。 いつでも、セッションに所属するプロセスグループの一つ (だけ)
+が 端末のフォアグランドのプロセスグループになることができ、 残りのプロセスグループはバックグラウンドになる。 端末からシグナルが生成された場合
+(例えば、中断キーを叩いて \fBSIGINT\fP が生成されるなど)、そのシグナルはフォアグラウンドのプロセスグループ に送られる
+(シグナルを生成する文字の説明は \fBtermios\fP(3) を参照)。 フォアグラウンドのプロセスグループだけが端末からの \fBread\fP(2)
+ができる。 バックグラウンドのプロセスグループが端末からの \fBread\fP(2) を行おうとした場合、そのプロセスグループにはシグナル
+\fBSIGTTIN\fP が送られ、そのプロセスグループは一時停止 (suspend) する。 関数 \fBtcgetpgrp\fP(3) と
+\fBtcsetpgrp\fP(3) を使うと、制御端末のフォアグラウンドのプロセスグループを 取得/設定できる。
\fBsetpgid\fP() と \fBgetpgrp\fP() は、 \fBbash\fP(1) のようなプログラムで、シェルのジョブ制御 (job
control) の実装のための プロセスグループを作成するのに使われる。
\fBgetuid\fP(2), \fBsetsid\fP(2), \fBtcgetpgrp\fP(3), \fBtcsetpgrp\fP(3), \fBtermios\fP(3),
\fBcredentials\fP(7)
.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.63 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。