ctermid3
Get controlling terminal name
Usage
#include <stdio.h>
char *ctermid(char *s);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
ctermid():
_POSIX_C_SOURCE
Library
Standard C library (libc, -lc)
Overview
ctermid() returns a string which is the pathname for the current controlling terminal for this process. If s is NULL, a static buffer is used, otherwise s points to a buffer used to hold the terminal pathname. The symbolic constant L_ctermid is the maximum number of characters in the returned pathname.
Return value
The pointer to the pathname.
Attributes
For an explanation of the terms used in this section, see attributes(7).
| Interface | Attribute | Value |
| ctermid() | Thread safety | MT-Safe |
Releases
19 releases since Debian 1.1 (Buzz); the text changed 13 times.