.\" Hey Emacs! This file is -*- nroff -*- source. .\" This man page was written by Jeremy Phelps . .\" Redistribute and modify at will. .\" .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI .\" all rights reserved. .\" Translated Tue Jul 8 01:44:54 JST 2003 .\" by Akihiro MOTOKI .\" .\"WORD: pseudoterminal 擬似端末 .\"WORD: specific 独自の .\" .TH GETPT 3 2010-09-10 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .\"O getpt \- open the pseudoterminal master (PTM) .SH 名前 getpt \- 擬似端末マスタ (PTM) をオープンする .\"O .SH SYNOPSIS .SH 書式 .nf .\"O .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .BR "#define _GNU_SOURCE" " /* feature_test_macros(7) 参照 */" .B #include .sp .B "int getpt(void);" .fi .\"O .SH DESCRIPTION .SH 説明 .\"O .BR getpt () .\"O opens a pseudoterminal master and returns its file descriptor. .BR getpt () は、擬似端末マスタをオープンし、そのファイル・ディスクリプタを返す。 .\"O It is equivalent to .\"O .nf .\"O .\"O open(/dev/ptmx, O_RDWR | O_NOCTTY); .\"O .\"O .fi .\"O on Linux systems, though the pseudoterminal master is located .\"O elsewhere on some systems that use GNU Libc. これは、 Linux システムにおいては .nf open(/dev/ptmx, O_RDWR | O_NOCTTY); .fi と等価である。但し、 GNU Libc を使用していても、 擬似端末マスタがどこか他の場所にあるシステムもある。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O .BR getpt () .\"O returns an open file descriptor upon successful completion. .\"O Otherwise, it .\"O returns \-1 and sets .\"O .I errno .\"O to indicate the error. 成功した場合、 .BR getpt () はオープンしたファイルのディスクリプタを返す。 そうでない場合、\-1 を返し、 .I errno にエラーを示す値がセットされる。 .\"O .SH ERRORS .SH エラー .\"O .BR getpt () .\"O can fail with various errors described in .\"O .BR open (2). .BR getpt () は .BR open (2) で説明されている種々のエラーで失敗する可能性がある。 .\"O .SH VERSIONS .SH バージョン .\"O .BR getpt () .\"O is provided in glibc since version 2.1. .BR getpt () は、バージョン 2.1 以降の glibc で提供されている。 .\"O .SH CONFORMING TO .SH 準拠 .\"O .BR getpt () .\"O is glibc-specific; .\"O use .\"O .BR posix_openpt (3) .\"O instead. .BR getpt () は glibc 独自である。代わりに .BR posix_openpt (3) を使用すること。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR grantpt (3), .BR posix_openpt (3), .BR ptsname (3), .BR unlockpt (3), .BR ptmx (4), .BR pty (7)