ISATTY
Section: Linux Programmer's Manual (3)
Updated: 2019-03-06
Index JM Home Page
名前
isatty - ファイルディスクリプターが端末を参照しているかをチェックする
書式
#include <unistd.h>
int isatty(int fd);
説明
isatty() 関数は、 fd が端末を参照するオープンされたファイルディスクリプターかどうかを チェックする。
返り値
isatty() は、 fd が端末を参照するオープンされたファイルディスクリプターであれば 1 を返す。 そうでなければ 0 を返し、 errno にエラーを示す値を設定する。
エラー
- EBADF
- fd が有効なファイルディスクリプターではない。
- ENOTTY
- fd refers to a file other than a terminal. On some older kernels, some types of files resulted in the error EINVAL in this case (which is a violation of POSIX, which specifies the error ENOTTY).
属性
この節で使用されている用語の説明については、 attributes(7) を参照。
| インターフェース |
属性 |
値
|
| isatty() |
Thread safety |
MT-Safe
|
準拠
POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
関連項目
fstat(2), ttyname(3)
この文書について
この man ページは Linux man-pages プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は https://www.kernel.org/doc/man-pages/ に書かれている。
関連キーワード
Linux マニュアル 一覧
関連するコマンド・関数
Index
- 名前
- 書式
- 説明
- 返り値
- エラー
- 属性
- 準拠
- 関連項目
- この文書について
This document was created by man2html, using the manual pages.
Time: 04:39:23 GMT, October 11, 2026