.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified Sat Jul 24 19:51:06 1993 by Rik Faith (faith@cs.unc.edu) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya .\" all rights reserved. .\" Translated Mon Feb 10 1997 by Hiroaki Nagoya .\" .TH CTERMID 3 2019\-03\-06 GNU "Linux Programmer's Manual" .SH 名前 ctermid \- 制御端末名の取得 .SH 書式 .nf .\" POSIX also requires this function to be declared in , .\" and glibc does so if suitable feature test macros are defined. \fB#include \fP .PP \fBchar *ctermid(char *\fP\fIs\fP\fB);\fP .fi .PP .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP \fBctermid\fP(): _POSIX_C_SOURCE .SH 説明 \fBctermid\fP() はプロセスの現在の制御端末のパス名を返す。 \fIs\fP が NULL の場合、静的なバッファーを用いる。それ以外の場合、 \fIs\fP は端末パス名を保持するのに使用されるバッファーへのポインターとなる。 シンボル定数 \fBL_ctermid\fP は返されるパス名の最大文字数である。 .SH 返り値 パス名へのポインター。 .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lb lb lb l l l. インターフェース 属性 値 T{ \fBctermid\fP() T} Thread safety MT\-Safe .TE .SH 準拠 POSIX.1\-2001, POSIX.1\-2008, Svr4. .SH バグ The returned pathname may not uniquely identify the controlling terminal; it may, for example, be \fI/dev/tty\fP. .PP .\" in glibc 2.3.x, x >= 4, the glibc headers threw an error .\" if ctermid() was given an argument; fixed in 2.4. プログラムが端末をオープンできることは保証されていない。 .SH 関連項目 \fBttyname\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。