Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


CTERMID

Section: Linux Programmer's Manual (3)
Updated: 2007-07-26
Index Return to Main Contents
 

NAME

ctermid - get controlling terminal name  

SYNOPSIS

#include <stdio.h>

char *ctermid(char *s);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

ctermid(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE  

DESCRIPTION

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.  

CONFORMING TO

Svr4, POSIX.1-2001.  

BUGS

The path returned may not uniquely identify the controlling terminal; it may, for example, be /dev/tty.

It is not assured that the program can open the terminal.  

SEE ALSO

ttyname(3)  

COLOPHON

This page is part of release 3.35 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://man7.org/linux/man-pages/.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
CONFORMING TO
BUGS
SEE ALSO
COLOPHON


for client 18.220.160.216
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/