]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) |
2 | .\" | |
3 | .\" Permission is granted to make and distribute verbatim copies of this | |
4 | .\" manual provided the copyright notice and this permission notice are | |
5 | .\" preserved on all copies. | |
6 | .\" | |
7 | .\" Permission is granted to copy and distribute modified versions of this | |
8 | .\" manual under the conditions for verbatim copying, provided that the | |
9 | .\" entire resulting derived work is distributed under the terms of a | |
10 | .\" permission notice identical to this one. | |
11 | .\" | |
12 | .\" Since the Linux kernel and libraries are constantly changing, this | |
13 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
14 | .\" responsibility for errors or omissions, or for damages resulting from | |
15 | .\" the use of the information contained herein. The author(s) may not | |
16 | .\" have taken the same level of care in the production of this manual, | |
17 | .\" which is licensed free of charge, as they might when working | |
18 | .\" professionally. | |
19 | .\" | |
20 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
21 | .\" the source, must acknowledge the copyright and authors of this work. | |
22 | .\" License. | |
23 | .\" Modified Sat Jul 24 19:51:06 1993 by Rik Faith (faith@cs.unc.edu) | |
24 | .TH CTERMID 3 1993-04-06 "GNU" "Linux Programmer's Manual" | |
25 | .SH NAME | |
26 | ctermid \- get controlling terminal name | |
27 | .SH SYNOPSIS | |
28 | .nf | |
29 | .B #include <stdio.h> | |
30 | .sp | |
31 | .BI "char *ctermid(char *" "s" ); | |
32 | .fi | |
33 | .SH DESCRIPTION | |
63aa9df0 | 34 | .BR ctermid () |
fea681da MK |
35 | returns a string which is the pathname for the current controlling terminal for this |
36 | process. | |
37 | If | |
38 | .I s | |
39 | is | |
40 | .BR NULL , | |
41 | a static buffer is used, otherwise | |
42 | .I s | |
43 | points to a buffer used to hold the terminal pathname. | |
44 | The symbolic constant | |
45 | .B L_ctermid | |
46 | is the maximum number of characters in the returned pathname. | |
47 | .SH "RETURN VALUE" | |
48 | The pointer to the pathname. | |
49 | .SH "CONFORMING TO" | |
50 | SVID, Issue 1; POSIX.1 | |
51 | .SH BUGS | |
52 | The path returned may not uniquely identify the controlling | |
53 | terminal; it may, for example, be | |
54 | .BR /dev/tty . | |
55 | .PP | |
56 | It is not assured that the program can open the terminal. | |
57 | .SH "SEE ALSO" | |
58 | .BR ttyname (3) |