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/ に書かれている。

関連キーワード

端末   isatty   チェック   オープン   unistd   refers   terminal   older   kernels   types   files   resulted   case   violation   specifies   用語   allbox   インターフェース   属性   Thread   safety   リリース   一部   バグ   報告

Linux マニュアル 一覧

関連するコマンド・関数

tty.4   tty.1   tcgetsid.3   tcgetpgrp.3   tcsetpgrp.3   vhangup.2
 

Index

名前
書式
説明
返り値
エラー
属性
準拠
関連項目
この文書について

This document was created by man2html, using the manual pages.
Time: 04:39:23 GMT, October 11, 2026