Post

Replies

Boosts

Views

Activity

Setting non-blocking on a pty not working
I'm porting some code to MacOS (13 in this case) and I'm having an issue with something that seems strange. Setting O_NONBLOCK on a pty fails with Inappropriate ioctl for device (25) I'm doing: rv = fcntl(fd, F_GETFL, 0); if (rv == -1) return -1 rv |= O_NONBLOCK; if (fcntl(fd, F_SETFL, rv) == -1) return -1; In fact, if I pass in 0 for "rv" to fcntl() it gives the same failure. Just for pty masters, not for anything else I've seen. I need it to be non-blocking to avoid lockups.
3
0
753
Jul ’23