Use openpty(3) to open PTYs, to achieve compatibility with OpenBSD as posix_openpty() returns a file descriptor which does not block on read() nor select()