The essence of my question is "How can a user program open a pty (e.g., /dev/ptyp0) on Mac OS High Sierra?" A standard open() of the device name does not seem to work, even though its protections are crw-rw-rw-.
The context is running Emacs under Mac OS. Before High Sierra, when I ordered Emacs to create a shell window within which is a subprocess, Emacs allocated a pty with which to communicate with the subprocess. After upgrading to High Sierra, Emacs can no longer allocate the pty, and uses pipes to communicate with the subprocess. This makes the subprocess act less like a shell-in-a-terminal-window, which is a poorer user experience.
Tracing Emacs' operations shows that Emacs is trying in sequence to open each of the ptys defined on the system, and receiving errno 35 each time.
I have located one item online that suggests that how one opens pty's on Mac OS High Sierra is different from previous versions of Mac OS, but it gave no details.