1CTERMID(3)                 Linux Programmer's Manual                CTERMID(3)
2
3
4

NAME

6       ctermid - get controlling terminal name
7

SYNOPSIS

9       #include <stdio.h>
10
11       char *ctermid(char *s);
12

DESCRIPTION

14       ctermid()  returns  a string which is the pathname for the current con‐
15       trolling terminal for this process.  If s is NULL, a static  buffer  is
16       used,  otherwise  s  points to a buffer used to hold the terminal path‐
17       name.  The symbolic constant L_ctermid is the maximum number of charac‐
18       ters in the returned pathname.
19

RETURN VALUE

21       The pointer to the pathname.
22

CONFORMING TO

24       Svr4, POSIX.1-2001.
25

BUGS

27       The  path  returned may not uniquely identify the controlling terminal;
28       it may, for example, be /dev/tty.
29
30       It is not assured that the program can open the terminal.
31

SEE ALSO

33       ttyname(3)
34
35
36
37GNU                               1993-04-06                        CTERMID(3)
Impressum