File: ptsname.3

package info (click to toggle)
manpages 1.70-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,704 kB
  • ctags: 7
  • sloc: perl: 162; sh: 94; makefile: 70; lisp: 22
file content (37 lines) | stat: -rw-r--r-- 840 bytes parent folder | download
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
31
32
33
34
35
36
37
.\" Hey Emacs! This file is -*- nroff -*- source.
.\" This page is in the public domain. - aeb
.\"
.TH PTSNAME 3 "2003-01-30" "PTY Control" "Linux Programmer's Manual"
.SH NAME
ptsname \- get the name of the slave pseudotty
.SH SYNOPSIS
.nf
.B #define _XOPEN_SOURCE
.br
.B #include <stdlib.h>
.sp
.BI "char *ptsname(int " fd ");"
.fi
.SH DESCRIPTION
The
.BR ptsname ()
function returns the name of the slave pseudo-terminal device (pty)
corresponding to the master pty referred to by
.IR fd .
.SH "RETURN VALUE"
When successful,
.BR ptsname ()
returns a pointer to a string in static storage. This pointer
must not be freed.
.PP
Upon failure, 
.BR ptsname ()
returns a NULL pointer.
.SH "CONFORMING TO"
POSIX 1003.1-2001.
This is part of the Unix98 pty support, see
.BR pts (4).
.SH "SEE ALSO"
.BR grantpt (3),
.BR ttyname (3),
.BR pts (4)