OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man3 / tcgetpgrp.3
index 8bc69e4..385f4e5 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
-.\"         all rights reserved.
-.\" Translated Sat Jul 19 03:06:26 JST 2003
-.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"*******************************************************************
 .\"
-.TH TCGETPGRP 3 2003-01-28 "GNU" "Linux Programmer's Manual"
-.\"O .SH NAME
-.\"O tcgetpgrp, tcsetpgrp \- get and set terminal foreground process group
-.SH Ì¾Á°
-tcgetpgrp, tcsetpgrp \- Ã¼Ëö¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤Î
-¼èÆÀ/ÀßÄê¤ò¹Ô¤¦
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.B "#include <unistd.h>"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH TCGETPGRP 3 2003\-01\-28 GNU "Linux Programmer's Manual"
+.SH 名前
+tcgetpgrp, tcsetpgrp \- 端末のフォアグラウンド・プロセス・グループの 取得/設定を行う
+.SH 書式
+\fB#include <unistd.h>\fP
 .sp
-.BI "pid_t tcgetpgrp(int " fd );
+\fBpid_t tcgetpgrp(int \fP\fIfd\fP\fB);\fP
 .sp
-.BI "int tcsetpgrp(int " fd ", pid_t " pgrp );
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O The function
-.\"O .BR tcgetpgrp ()
-.\"O returns the process group ID of the foreground process group on the
-.\"O terminal associated to
-.\"O .IR fd ,
-.\"O which must be the controlling terminal of the calling process.
-.\"O .\" The process itself may be a background process.
-´Ø¿ô
-.BR tcgetpgrp ()
-¤Ï¡¢
-.I fd
-¤ËÂбþ¤¹¤ëüËö¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤Î
-¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥× ID ¤òÊÖ¤¹¡£
-.I fd
-¤Ç»ØÄꤵ¤ì¤¿Ã¼Ëö¤Ï¡¢¸Æ¤Ó½Ð¤·¤ò¹Ô¤¦¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-.\" ¥×¥í¥»¥¹¼«ÂΤϥХ寥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¤Ç¤¢¤Ã¤Æ¤â¤è¤¤¡£
+\fBint tcsetpgrp(int \fP\fIfd\fP\fB, pid_t \fP\fIpgrp\fP\fB);\fP
+.SH 説明
+.\" The process itself may be a background process.
+関数 \fBtcgetpgrp\fP()  は、 \fIfd\fP に対応する端末のフォアグラウンド・プロセス・グループの プロセス・グループ ID を返す。
+\fIfd\fP で指定された端末は、呼び出しを行うプロセスの制御端末でなければならない。
 .LP
-.\"O The function
-.\"O .BR tcsetpgrp ()
-.\"O makes the process group with process group ID \fIpgrp\fP
-.\"O the foreground process group on the terminal associated to
-.\"O .IR fd ,
-.\"O which must be the controlling terminal of the calling process,
-.\"O and still be associated with its session.
-.\"O Moreover, \fIpgrp\fP must be a (nonempty) process group belonging to
-.\"O the same session as the calling process.
-´Ø¿ô
-.BR tcsetpgrp ()
-¤Ï¡¢¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×ID ¤¬ \fIpgrp\fP ¤Î¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤ò
-.I fd
-¤ËÂбþ¤¹¤ëüËö¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤Ë¤¹¤ë¡£
-¤³¤Î¤È¤­¡¢
-.I fd
-¤Ï
-.BR tcsetpgrp ()
-¤ò¸Æ¤Ó½Ð¤¹¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-¤µ¤é¤Ë¡¢ \fIpgrp\fP ¤Ï¡¢¸Æ¤Ó½Ð¤·¤ò¹Ô¤¦¥×¥í¥»¥¹¤ÈƱ¤¸¥»¥Ã¥·¥ç¥ó¤Ë
-°¤¹¤ë (¥á¥ó¥Ð¤¬¶õ¤Ç¤Ê¤¤) ¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+関数 \fBtcsetpgrp\fP()  は、プロセス・グループID が \fIpgrp\fP のプロセス・グループを \fIfd\fP
+に対応する端末のフォアグラウンド・プロセス・グループにする。 このとき、 \fIfd\fP は \fBtcsetpgrp\fP()
+を呼び出すプロセスの制御端末でなければならない。 さらに、 \fIpgrp\fP は、呼び出しを行うプロセスと同じセッションに 属する (メンバが空でない)
+プロセス・グループでなければならない。
 .LP
-.\"O If
-.\"O .BR tcsetpgrp ()
-.\"O is called by a member of a background process group in its session,
-.\"O and the calling process is not blocking or ignoring
-.\"O .BR SIGTTOU ,
-.\"O a
-.\"O .B SIGTTOU
-.\"O signal is sent to all members of this background process group.
-.BR tcsetpgrp ()
-¤¬¥»¥Ã¥·¥ç¥ó¤Ë°¤¹¤ë¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¡¦¥°¥ë¡¼¥×¡¦¥×¥í¥»¥¹¤Î¥á¥ó¥Ð¤«¤é
-¸Æ¤Ó½Ð¤µ¤ì¡¢¤«¤Ä¸Æ¤Ó½Ð¤·¤ò¹Ô¤¦¥×¥í¥»¥¹¤¬
-.B SIGTTOU
-¤ò¥Ö¥í¥Ã¥¯¤·¤¿¤ê
-̵»ë¤·¤¿¤ê¤¹¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
-.B SIGTTOU
-¥·¥°¥Ê¥ë¤Ï
-¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤ÎÁ´¤Æ¤Î¥á¥ó¥Ð¤ËÁ÷¤é¤ì¤ë¡£
-.\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
-.\"O When
-.\"O .I fd
-.\"O refers to the controlling terminal of the calling process,
-.\"O the function
-.\"O .BR tcgetpgrp ()
-.\"O will return the foreground process group ID of that terminal
-.\"O if there is one, and some value larger than 1 that is not
-.\"O presently a process group ID otherwise.
-.I fd
-¤¬¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤ò»²¾È¤·¤Æ¤¤¤ë¾ì¹ç¡¢´Ø¿ô
-.BR tcgetpgrp ()
-¤Ï¡¢¤½¤ÎÀ©¸æüËö¤Î¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¡¦¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤¬¤¢¤ì¤Ð
-¤½¤Î¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤Î ID ¤òÊÖ¤¹¡£
-¤½¤Î¤è¤¦¤Ê¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤¬¤Ê¤±¤ì¤Ð¡¢¸½ºß¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥× ID
-¤È¤·¤Æ»ÈÍѤµ¤ì¤Æ¤¤¤Ê¤¤¡¢1¤è¤êÂ礭¤Ê²¿¤é¤«¤ÎÃͤ¬ÊÖ¤µ¤ì¤ë¡£
-.\"O When
-.\"O .I fd
-.\"O does not refer to the controlling terminal of the calling process,
-.\"O \-1 is returned, and
-.\"O .I errno
-.\"O is set appropriately.
-.I fd
-¤¬¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥×¥í¥»¥¹¤ÎÀ©¸æüËö¤ò»²¾È¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
-\-1 ¤¬ÊÖ¤µ¤ì¡¢
-.I errno
-¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë¡£
+\fBtcsetpgrp\fP()  がセッションに属するバックグラウンド・グループ・プロセスのメンバから 呼び出され、かつ呼び出しを行うプロセスが
+\fBSIGTTOU\fP をブロックしたり 無視したりするようになっていない場合、 \fBSIGTTOU\fP シグナルは
+バックグラウンド・プロセス・グループの全てのメンバに送られる。
+.SH 返り値
+\fIfd\fP が呼び出しを行ったプロセスの制御端末を参照している場合、関数 \fBtcgetpgrp\fP()
+は、その制御端末のフォアグラウンド・プロセス・グループがあれば そのプロセス・グループの ID を返す。
+そのようなプロセス・グループがなければ、現在プロセス・グループ ID として使用されていない、1より大きな何らかの値が返される。 \fIfd\fP
+が呼び出しを行ったプロセスの制御端末を参照していない場合、 \-1 が返され、 \fIerrno\fP が適切に設定される。
 .LP
-.\"O When successful,
-.\"O .BR tcsetpgrp ()
-.\"O returns 0.
-.\"O Otherwise, it returns \-1, and
-.\"O .I errno
-.\"O is set appropriately.
-À®¸ù¤·¤¿¾ì¹ç¡¢
-.BR tcsetpgrp ()
-¤Ï 0 ¤òÊÖ¤¹¡£¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¡¢ \-1 ¤òÊÖ¤·¡¢
-.I errno
-¤òŬÀÚ¤ËÀßÄꤹ¤ë¡£
-.\"O .SH ERRORS
-.SH ¥¨¥é¡¼
-.TP
-.B EBADF
-.\"O .I fd
-.\"O is not a valid file descriptor.
-.I fd
-¤ÏÍ­¸ú¤Ê¥Õ¥¡¥¤¥ëµ­½Ò»Ò¤Ç¤Ê¤¤¡£
-.TP
-.B EINVAL
-.\"O .I pgrp
-.\"O has an unsupported value.
-.I pgrp
-¤¬Ìµ¸ú¤ÊÃͤǤ¢¤ë¡£
-.TP
-.B ENOTTY
-.\"O The calling process does not have a controlling terminal, or
-.\"O it has one but it is not described by
-.\"O .IR fd ,
-.\"O or, for
-.\"O .BR tcsetpgrp (),
-.\"O this controlling terminal is no longer associated with the session
-.\"O of the calling process.
-¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥×¥í¥»¥¹¤¬À©¸æüËö¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡¢¤â¤·¤¯¤Ï
-À©¸æüËö¤ò»ý¤Ã¤Æ¤¤¤ë¤¬
-.I fd
-¤Ç»²¾È¤µ¤ì¤ë¤â¤Î¤È¤Ï°Û¤Ê¤ë¡¢
-.BR tcsetpgrp ()
-¤Î¾ì¹ç¤Ï¡¢
-.I fd
-¤Ç»ØÄꤵ¤ì¤¿À©¸æüËö¤¬¤¹¤Ç¤Ë¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥×¥í¥»¥¹¤Î¥»¥Ã¥·¥ç¥ó
-¤È´Ø·¸¤Î¤Ê¤¤¤â¤Î¤Ë¤Ê¤Ã¤Æ¤¤¤ëºÝ¤Ë¤â¡¢¤³¤Î¥¨¥é¡¼¤È¤Ê¤ë¡£
-.TP
-.B EPERM
-.\"O .I pgrp
-.\"O has a supported value, but is not the process group ID of a
-.\"O process in the same session as the calling process.
-.I pgrp
-¤¬Í­¸ú¤ÊÃͤÀ¤¬¡¢¸Æ¤Ó½Ð¤·¤ò¹Ô¤Ã¤¿¥×¥í¥»¥¹¤ÈƱ¤¸¥»¥Ã¥·¥ç¥ó¤Ë°¤¹¤ë
-¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥× ID ¤Ë¤Ï³ºÅö¤¹¤ë¤â¤Î¤¬¤Ê¤¤¡£
-.\"O .SH "CONFORMING TO"
-.SH ½àµò
-POSIX.1-2001.
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O These functions are implemented via the
-.\"O .B TIOCGPGRP
-.\"O and
-.\"O .B TIOCSPGRP
-.\"O ioctls.
-¤³¤Î´Ø¿ô¤Ï
-.B TIOCGPGRP
-¤È
-.B TIOCGSID
-¤Î ioctl ·Ðͳ¤Ç¼Â¸½¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .SS History
-.SS Îò»Ë
-.\"O The ioctls appeared in 4.2BSD.
-.\"O The functions are POSIX inventions.
-¤³¤ì¤é¤Î ioctl ¤Ï 4.2BSD ¤ÇÅо줷¤¿¡£
-¤³¤ì¤é¤Î´Ø¿ô¤Ï POSIX ¤Ç¹Í°Æ¤µ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¡£
-.\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
-.BR setpgid (2),
-.BR setsid (2),
-.BR credentials (7)
+成功した場合、 \fBtcsetpgrp\fP()  は 0 を返す。そうでない場合、 \-1 を返し、 \fIerrno\fP を適切に設定する。
+.SH エラー
+.TP 
+\fBEBADF\fP
+\fIfd\fP が適切なファイル・ディスクリプターでない。
+.TP 
+\fBEINVAL\fP
+\fIpgrp\fP が無効な値である。
+.TP 
+\fBENOTTY\fP
+呼び出しを行ったプロセスが制御端末を持っていない、もしくは 制御端末を持っているが \fIfd\fP で参照されるものとは異なる、
+\fBtcsetpgrp\fP()  の場合は、 \fIfd\fP で指定された制御端末がすでに呼び出しを行ったプロセスのセッション
+と関係のないものになっている際にも、このエラーとなる。
+.TP 
+\fBEPERM\fP
+\fIpgrp\fP が有効な値だが、呼び出しを行ったプロセスと同じセッションに属する プロセスのプロセス・グループ ID には該当するものがない。
+.SH 準拠
+POSIX.1\-2001.
+.SH 注意
+この関数は \fBTIOCGPGRP\fP と \fBTIOCGSID\fP の ioctl 経由で実現されている。
+.SS 歴史
+これらの ioctl は 4.2BSD で登場した。 これらの関数は POSIX で考案されたものである。
+.SH 関連項目
+\fBsetpgid\fP(2), \fBsetsid\fP(2), \fBcredentials\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。