Open and return a file descriptor for a master pseudo-terminal device. Performs a posix_openpt() C function call. The oflag argument is used to set file status flags and file access modes as specified in the manual page of posix_openpt() of your system.