Stream Pipes: how to use them on V.3/386

Gil Pilz@Eng@Banyan gil at banyan.UUCP
Wed Sep 27 07:38:16 AEST 1989


In article <405 at belltec.UUCP> jom at belltec.UUCP (Jerry Merlaine) writes:

(see previous post for full routine)

>	fdi.ctlbuf.buf = (char *) pv; <---- these two together are wrong ??
>	fdi.ctlbuf.len = 4;                  /
>	fdi.databuf.buf = 0;                /
>	fdi.databuf.len = -1;              /
>	fdi.offset = 0;            <------/
>	fdi.fildes = pv[1];
>	fdi.flags = 0;
>	if (ioctl(pv[0], I_FDINSERT, &fdi) < -1) {
>		close(pv[0]);
>		close(pv[1]);
>		return -1;
>	}

As I understand the streamio(7) documentation (which is to say,
barely), this is gonna cause you to roach pv[0] when the ioctl returns
the address of the read queue structure of the driver for the stream
corresponding to pv[1]. I think maybe you might want to do something
like . .

long foo;

fdi.ctlbuf.buf = &foo;
fdi.ctlbuf.len = sizeof(long);
fdi.offset = 0;

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
        Gilbert W. Pilz Jr.       gil at banyan.com
        Banyan Systems Inc.       (617) 898-1196
        115 Flanders Road
        Westboro, MA 01581
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-



More information about the Comp.unix.i386 mailing list