File: getpt.3

package info (click to toggle)
manpages-ja 0.5.0.0.20120606-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 25,964 kB
  • sloc: perl: 161; makefile: 116
file content (43 lines) | stat: -rw-r--r-- 1,983 bytes parent folder | download
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
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
.\" Redistribute and modify at will.
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH GETPT 3 2010\-09\-10 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 準拠
\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.41 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。