Index of Section 3 Manual Pages
| Interix / SUA | ctermid.3 | Interix / SUA |
ctermid(3) ctermid(3)
ctermid()
NAME
ctermid() - generate terminal pathname
SYNOPSIS
#include
char * ctermid (char *buf)
DESCRIPTION
The ctermid(3) function generates a string that, when used as a pathname,
refers to the current controlling terminal of the calling process.
RETURN VALUES
If buf is the NULL pointer, the function returns a pointer to a static
area, which may be overwritten by subsequent calls to ctermid(3).
Consequently, this function is thread safe only if the buf argument is not
NULL. If buf is not NULL, the pathname is copied into the memory
referenced by buf. The argument buf is assumed to be at least {L_ctermid}
(as defined in the include file ) bytes long.
NOTES
This implementation of the ctermid(3) function always returns /dev/tty.
SEE ALSO
ttyname(2)
USAGE NOTES
The ctermid function is thread safe.
The ctermid function is not async-signal safe.