Eric, > > * doc/posix-functions/posix_openpt.texi: Mention ENOENT error code. > > Which platforms failed with ENOENT?
On those platforms that don't have posix_openpt() already, except AIX and native Windows, you attempt to open /dev/ptmx. If it does not exist, the function fails with ENOENT. This is the case at least on OpenBSD 4.9, Minix 3.1.8, possibly also on MacOS X 10.3, BeOS. > And on those platforms, is there an > alternative to opening a master side, perhaps by iterating through the > list of pty pairs in /dev until a master side is successfully opened? The comments in lib/openpty.c say so, yes. Bruno 2011-10-20 Bruno Haible <br...@clisp.org> openpty: Update comments. * lib/openpty.c: Add comments about Minix. --- lib/openpty.c.orig Thu Oct 20 11:42:29 2011 +++ lib/openpty.c Thu Oct 20 11:42:03 2011 @@ -92,6 +92,7 @@ /* If all this does not work, we could try to open, one by one: - On MacOS X: /dev/pty[p-w][0-9a-f] - On *BSD: /dev/pty[p-sP-S][0-9a-v] + - On Minix: /dev/pty[p-q][0-9a-f] - On AIX: /dev/ptyp[0-9a-f] - On HP-UX: /dev/pty[p-r][0-9a-f] - On OSF/1: /dev/pty[p-q][0-9a-f] -- In memoriam Eduard Brücklmeier <http://en.wikipedia.org/wiki/Eduard_Brücklmeier>