File: getpt.3

package info (click to toggle)
manpages-ja 0.5.0.0.20210215%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 28,568 kB
  • sloc: perl: 161; makefile: 58
file content (54 lines) | stat: -rw-r--r-- 2,326 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
.\"
.\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE)
.\" Redistribute and modify at will.
.\" %%%LICENSE_END
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.\"
.\" Japanese Version Copyright (c) 2003  Akihiro MOTOKI
.\"         all rights reserved.
.\" Translated Tue Jul  8 01:44:54 JST 2003
.\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.TH GETPT 3 2014\-04\-01 GNU "Linux Programmer's Manual"
.SH 名前
getpt \- 擬似端末マスタ (PTM) をオープンする
.SH 書式
.nf
\fB#define _GNU_SOURCE\fP             /* feature_test_macros(7) 参照 */
\fB#include <stdlib.h>\fP
.sp
\fBint getpt(void);\fP
.fi
.SH 説明
\fBgetpt\fP()  は、擬似端末マスタをオープンし、そのファイルディスクリプターを返す。 これは、 Linux システムにおいては
.nf

    open(/dev/ptmx, O_RDWR | O_NOCTTY);

.fi
と等価である。但し、 GNU Libc を使用していても、 擬似端末マスタがどこか他の場所にあるシステムもある。
.SH 返り値
成功した場合、 \fBgetpt\fP()  はオープンしたファイルのディスクリプターを返す。 そうでない場合、\-1 を返し、 \fIerrno\fP
にエラーを示す値がセットされる。
.SH エラー
\fBgetpt\fP()  は \fBopen\fP(2)  で説明されている種々のエラーで失敗する可能性がある。
.SH バージョン
\fBgetpt\fP()  は、バージョン 2.1 以降の glibc で提供されている。
.SH 属性
.SS "マルチスレッディング (pthreads(7) 参照)"
\fBgetpt\fP() 関数はスレッドセーフである。
.SH 準拠
\fBgetpt\fP()  は glibc 独自である。代わりに \fBposix_openpt\fP(3)  を使用すること。
.SH 関連項目
\fBgrantpt\fP(3), \fBposix_openpt\fP(3), \fBptsname\fP(3), \fBunlockpt\fP(3),
\fBptmx\fP(4), \fBpty\fP(7)
.SH この文書について
この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。