plucky (3) isatty.3.gz

Provided by: manpages-ja-dev_0.5.0.0.20221215+dfsg-1_all bug

名前

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