OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / getpt.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
3 .\" Redistribute and modify at will.
4 .\"
5 .\"*******************************************************************
6 .\"
7 .\" This file was generated with po4a. Translate the source file.
8 .\"
9 .\"*******************************************************************
10 .TH GETPT 3 2010\-09\-10 GNU "Linux Programmer's Manual"
11 .SH 名前
12 getpt \- 擬似端末マスタ (PTM) をオープンする
13 .SH 書式
14 .nf
15 \fB#define _GNU_SOURCE\fP             /* feature_test_macros(7) 参照 */
16 \fB#include <stdlib.h>\fP
17 .sp
18 \fBint getpt(void);\fP
19 .fi
20 .SH 説明
21 \fBgetpt\fP()  は、擬似端末マスタをオープンし、そのファイル・ディスクリプタを返す。 これは、 Linux システムにおいては
22 .nf
23
24     open(/dev/ptmx, O_RDWR | O_NOCTTY);
25
26 .fi
27 と等価である。但し、 GNU Libc を使用していても、 擬似端末マスタがどこか他の場所にあるシステムもある。
28 .SH 返り値
29 成功した場合、 \fBgetpt\fP()  はオープンしたファイルのディスクリプタを返す。 そうでない場合、\-1 を返し、 \fIerrno\fP
30 にエラーを示す値がセットされる。
31 .SH エラー
32 \fBgetpt\fP()  は \fBopen\fP(2)  で説明されている種々のエラーで失敗する可能性がある。
33 .SH バージョン
34 \fBgetpt\fP()  は、バージョン 2.1 以降の glibc で提供されている。
35 .SH 準拠
36 \fBgetpt\fP()  は glibc 独自である。代わりに \fBposix_openpt\fP(3)  を使用すること。
37 .SH 関連項目
38 \fBgrantpt\fP(3), \fBposix_openpt\fP(3), \fBptsname\fP(3), \fBunlockpt\fP(3),
39 \fBptmx\fP(4), \fBpty\fP(7)