OSDN Git Service

3453681d580594fee2ad801db7d2df7a4166bfe4
[linuxjm/LDP_man-pages.git] / draft / man3 / grantpt.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" This page is in the public domain. - aeb
3 .\"
4 .\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
5 .\"         all rights reserved.
6 .\" Translated Tue Jul  8 01:56:27 JST 2003
7 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
8 .\"
9 .\"WORD:        pseudoterminal          擬似端末
10 .\"WORD:        pseudotty               擬似端末
11 .\"
12 .TH GRANTPT 3 2008-06-14 "GNU" "Linux Programmer's Manual"
13 .\"O .SH NAME
14 .\"O grantpt \- grant access to the slave pseudoterminal
15 .SH 名前
16 grantpt \- スレーブ擬似端末へのアクセスを許可する
17 .\"O .SH SYNOPSIS
18 .SH 書式
19 .nf
20 .\"O .BR "#define _XOPEN_SOURCE" "       /* See feature_test_macros(7) */"
21 .BR "#define _XOPEN_SOURCE" "       /* feature_test_macros(7) 参照 */"
22 .br
23 .B #include <stdlib.h>
24 .sp
25 .BI "int grantpt(int " fd ");"
26 .fi
27 .\"O .SH DESCRIPTION
28 .SH 説明
29 .\"O The
30 .\"O .BR grantpt ()
31 .\"O function changes the mode and owner of the slave pseudoterminal device
32 .\"O corresponding to the master pseudoterminal referred to by
33 .\"O .IR fd .
34 .BR grantpt ()
35 関数は、
36 .I fd
37 で参照されたマスタ擬似端末に対応するスレーブ擬似端末デバイス
38 のモードと所有者を変更する。
39 .\"O The user ID of the slave is set to the real UID of the calling process.
40 .\"O The group ID is set to an unspecified value (e.g., \fItty\fP).
41 .\"O The mode of the slave is set to 0620 (crw\-\-w\-\-\-\-).
42 スレーブのユーザID は呼び出したプロセスの実 UID に設定される。
43 グループID として設定される値は規定されていない (例えば \fItty\fP になる)。
44 スレーブのモードは 0620 (crw\-\-w\-\-\-\-) に設定される。
45 .PP
46 .\"O The behavior of
47 .\"O .BR grantpt ()
48 .\"O is unspecified if a signal handler is installed to catch
49 .\"O .B SIGCHLD
50 .\"O signals.
51 .B SIGCHLD
52 シグナルを捕捉するためにシグナル・ハンドラが設定されている場合の
53 .BR grantpt ()
54 の動作は規定されていない。
55 .\"O .SH "RETURN VALUE"
56 .SH 返り値
57 .\"O When successful,
58 .\"O .BR grantpt ()
59 .\"O returns 0.
60 .\"O Otherwise, it returns \-1 and sets
61 .\"O .I errno
62 .\"O appropriately.
63 成功した場合、
64 .BR grantpt ()
65 は 0 を返す。そうでない場合、\-1 を返し、
66 .I errno
67 に適切な値がセットされる。
68 .\"O .SH ERRORS
69 .SH エラー
70 .TP
71 .B EACCES
72 .\"O The corresponding slave pseudoterminal could not be accessed.
73 対応するスレーブ擬似端末にアクセスできなかった。
74 .TP
75 .B EBADF
76 .\"O The
77 .\"O .I fd
78 .\"O argument is not a valid open file descriptor.
79 引き数
80 .I fd
81 が有効なオープンされたファイル・ディスクリプタでない。
82 .TP
83 .B EINVAL
84 .\"O The
85 .\"O .I fd
86 .\"O argument is valid but not associated with a master pseudoterminal.
87 引き数
88 .I fd
89 は有効だが、マスタ擬似端末に対応するものではない。
90 .\"O .SH VERSIONS
91 .SH バージョン
92 .\"O .BR grantpt ()
93 .\"O is provided in glibc since version 2.1.
94 .BR grantpt ()
95 は、バージョン 2.1 以降の glibc で提供されている。
96 .\"O .SH "CONFORMING TO"
97 .SH 準拠
98 POSIX.1-2001.
99 .\"O .SH NOTES
100 .SH 備考
101 .\"O This is part of the UNIX 98 pseudoterminal support, see
102 .\"O .BR pts (4).
103 .\"O Many systems implement this function via a set-user-ID helper binary
104 .\"O called "pt_chown".
105 .\"O With Linux devpts no such helper binary is required.
106 これは UNIX 98 擬似端末 (pseudoterminal) 仕様の一部である。
107 .BR pts (4)
108 を参照のこと。
109 多くのシステムでは、この関数は "pt_chown" と呼ばれる set-user-ID された
110 補助バイナリを用いて実装されている。
111 Linux の devpts では、このような補助バイナリを必要としない。
112 .\"O .SH "SEE ALSO"
113 .SH 関連項目
114 .BR open (2),
115 .BR posix_openpt (3),
116 .BR ptsname (3),
117 .BR unlockpt (3),
118 .BR pts (4),
119 .BR pty (7)