Skip to main content
3 of 4
added 10 characters in body

how to get file descriptors of PTY in a child process?

https://man7.org/linux/man-pages/man7/pty.7.html

in the "UNIX 98 pseudoterminals" it is said that ptsname can be used (and then open), but this function accepts file descriptor. i tried to put 0 (STDIN) and 1 (STDOUT) in there, but it fails with "Inappropriate ioctl for device". im running my program from gnome-terminal

im not writing another xterm program. just want to have file descriptors for asynchronous (non-blocking) non-canonical low-level input and output.