1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" This page is in the public domain. - aeb
4 .TH GRANTPT 3 2008-06-14 "GNU" "Linux Programmer's Manual"
6 grantpt \- grant access to the slave psuedoterminal
9 .B #define _XOPEN_SOURCE
11 .B #include <stdlib.h>
13 .BI "int grantpt(int " fd ");"
18 function changes the mode and owner of the slave psuedoterminal device
19 (pty) corresponding to the master pty referred to by
21 The user ID of the slave is set to the real UID of the calling process.
22 The group ID is set to an unspecified value (e.g., \fItty\fP).
23 The mode of the slave is set to 0620 (crw\-\-w\-\-\-\-).
27 is unspecified if a signal handler is installed to catch
34 Otherwise, it returns \-1 and sets
40 The corresponding slave pty could not be accessed.
45 argument is not a valid open file descriptor.
50 argument is valid but not associated with a master pty.
53 is provided in glibc since version 2.1.
57 This is part of the UNIX 98 pty support, see
59 Many systems implement this function via a set-user-ID helper binary
61 With Linux devpts no such helper binary is required.
68 .BR feature_test_macros (7),