Xref: utzoo comp.sys.att:7242 unix-pc.general:3533 Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!n8emr!uncle!jbm From: jbm@uncle.UUCP (John B. Milton) Newsgroups: comp.sys.att,unix-pc.general Subject: Re: sockets & ptys Keywords: PD socket & PD pty Message-ID: <589@uncle.UUCP> Date: 9 Aug 89 05:47:02 GMT References: <637@holin.ATT.COM> <2229@umbc3.UMBC.EDU> Reply-To: jbm@uncle.UUCP (John B. Milton) Organization: U.N.C.L.E. Lines: 39 In article <2229@umbc3.UMBC.EDU> alex@umbc3.umbc.edu.UMBC.EDU (Alex S. Crain) writes: >In article <637@holin.ATT.COM> bes@holin.ATT.COM (Bradley Smith) writes: >>Now a question. I want select to work on the /dev/window as well >>(like stdin, stdout) but you can't access data in other loadable >>devices. I thought of find out what address the struct tty is at >>and looking at it that way. Does anyone have an idea? > You can access data in loadable devices, *if you know the address*. >One way of doing this is to link with /etc/lddrv/ifile.wind and assume that >this info will not change. Another way would be to have uipcinit() read >/etc/ldrv/ifile.wind (yuk). Since its reasonable to assume that wind.o >will always be the first driver loaded, then there is no reason that the >addresses should change, ever, so using that ifile is a reasonably good >way of doing it. You could justify it by assuming that the window driver >will someday be replaced, so this is only temporary :-). > > ld -r -o uipc.o /etc/lddrv/ifile.wind *.o > >should give you what you want. There is one minor problem. Everytime you change the version of the kernel you're using, each ifile.driver gets regenerated. The file /etc/.drvload does this: --- find . -name unix.sym ! -newer /unix -exec rm {} \; if [ ! -r unix.sym ] then echo creating unix.sym ./mkifile /unix unix.sym fi ---- and lddrv checks unix.sym to make sure it's older than the driver file So, you would have to at least regenerate the addresses everytime you change the kernel. John -- John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu (614) h:294-4823, w:785-1110; N8KSN, AMPR: 44.70.0.52; Don't FLAME, inform!