OSDN Git Service

(split) Refine LDP man3/expm1.3.
[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)