1 .\" %%%LICENSE_START(PUBLIC_DOMAIN)
2 .\" This page is in the public domain. - aeb
5 .TH GRANTPT 3 2008-06-14 "GNU" "Linux Programmer's Manual"
7 grantpt \- grant access to the slave pseudoterminal
10 .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
12 .B #include <stdlib.h>
14 .BI "int grantpt(int " fd ");"
19 function changes the mode and owner of the slave pseudoterminal device
20 corresponding to the master pseudoterminal referred to by
22 The user ID of the slave is set to the real UID of the calling process.
23 The group ID is set to an unspecified value (e.g.,
25 The mode of the slave is set to 0620 (crw\-\-w\-\-\-\-).
29 is unspecified if a signal handler is installed to catch
36 Otherwise, it returns \-1 and sets
42 The corresponding slave pseudoterminal could not be accessed.
47 argument is not a valid open file descriptor.
52 argument is valid but not associated with a master pseudoterminal.
55 is provided in glibc since version 2.1.
59 This is part of the UNIX 98 pseudoterminal support, see
61 Many systems implement this function via a set-user-ID helper binary
63 With Linux devpts no such helper binary is required.