Messages in this thread | | | Date | Mon, 17 Aug 1998 16:16:07 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: Out of ptys |
| |
On 17 Aug 1998, H. Peter Anvin wrote:
> 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. >
Well there was never a dup() of any kind, so there could not be a fd for stdout or stderr. I can see from the source that the idea was to open these devices until one could be found that did not fail.
> > > > 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. > >
Well this is what `MAKEDEV generic` set up.
ttyp0: character special (3/0) ttyp1: character special (3/1) ttyp2: character special (3/2) ttyp3: character special (3/3) ttyp4: character special (3/4) ttyp5: character special (3/5) ttyp6: character special (3/6) ttyp7: character special (3/7) ttyp8: character special (3/8) ttyp9: character special (3/9) ttypa: character special (3/10) ttypb: character special (3/11) ttypc: character special (3/12) ttypd: character special (3/13) ttype: character special (3/14) ttypf: character special (3/15)
Cheers, Dick Johnson ***** FILE SYSTEM WAS MODIFIED ***** Penguin : Linux version 2.1.115 on an i586 machine (66.15 BogoMips). Warning : It's hard to remain at the trailing edge of technology.
- 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
| |