grantpt(3) Library Functions Manual grantpt(3) grantpt - (libc -lc) #define _XOPEN_SOURCE #include int grantpt(int fd); glibc ( feature_test_macros(7)): grantpt(): glibc 2.24: _XOPEN_SOURCE >= 500 glibc 2.23 : _XOPEN_SOURCE grantpt() fd. UID . ( tty). 0620 (crw--w----). grantpt() SIGCHLD. grantpt() 0. -1 errno . EACCES . EBADF fd . EINVAL fd . attributes(7). +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ |grantpt() | | (locale) (MT-Safe) | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ POSIX.1-2008. glibc 2.1. POSIX.1-2001. UNIX 98 pts(4). set-user-ID "pt_chown". glibc glibc 2.33 BSD . -- pty -- ioctl(2). open(2), posix_openpt(3), ptsname(3), unlockpt(3), pts(4), pty(7) 3 . . : . 6.18 21 2025 grantpt(3)