sockets & ptys
John B. Milton
jbm at uncle.UUCP
Wed Aug 9 15:47:02 AEST 1989
In article <2229 at umbc3.UMBC.EDU> alex at umbc3.umbc.edu.UMBC.EDU (Alex S. Crain) writes:
>In article <637 at holin.ATT.COM> bes at 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 at uncle.UUCP, n8emr!uncle!jbm at osu-cis.cis.ohio-state.edu
(614) h:294-4823, w:785-1110; N8KSN, AMPR: 44.70.0.52; Don't FLAME, inform!
More information about the Unix-pc.general
mailing list