Re: Out of ptys

H. Peter Anvin (hpa@transmeta.com)
17 Aug 1998 18:45:08 GMT


Followup to: <Pine.LNX.3.95.980817104046.3228A-100000@chaos.analogic.com>
By author: "Richard B. Johnson" <root@chaos.analogic.com>
In newsgroup: linux.dev.kernel
>
> open("/dev/ptyp1", O_RDWR) = -1 EIO (I/O error)
> open("/dev/ptyp2", O_RDWR) = 3
>
> ioctl(1, TCGETS, 0xbffff1dc) = -1 EINVAL (Invalid argument)
> ioctl(2, TCGETS, 0xbffff1d0) = -1 EINVAL (Invalid argument)
>
> These are invalid because the first 2 opens failed. We don't have
> fds 1 and 2, only 0 and 3. (3 was the pty).
>

No, they are invalid because you don't have a stdout and stderr.
open() doesn't work the way you seem to think here.

>
> open("/dev/tty", O_RDWR) = -1 ENXIO (No such device or address)
>

ENXIO on /dev/tty means you don't have a current tty. From the trace
I suspect you have your /dev/ptyp*'s set up properly but your
/dev/ttyp*'s are broken.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html