getpt(3) Library Functions Manual getpt(3) getpt - open a new pseudoterminal master C (libc, -lc) #define _GNU_SOURCE /* feature_test_macros(7) */ #include int getpt(void); getpt() opens a new pseudoterminal device and returns a file descriptor that refers to that device. It is equivalent to opening the pseudoterminal multiplexor device open("/dev/ptmx", O_RDWR); on Linux systems, though the pseudoterminal multiplexor device is located elsewhere on some systems that use the GNU C library. getpt() . -1 errno . getpt() , open(2). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |getpt() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ Use posix_openpt(3) instead. GNU. glibc 2.1. grantpt(3), posix_openpt(3), ptsname(3), unlockpt(3), ptmx(4), pty(7) () Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . getpt(3)