bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] posix_openpt: new module


From: Bruno Haible
Subject: Re: [PATCH] posix_openpt: new module
Date: Thu, 20 Oct 2011 11:44:54 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

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  <address@hidden>

        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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]