Xref: utzoo comp.unix.wizards:18348 comp.unix.i386:583 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!bloom-beacon!spdcc!xylogics!cloud9!banyan!gil From: gil@banyan.UUCP (Gil Pilz@Eng@Banyan) Newsgroups: comp.unix.wizards,comp.unix.i386 Subject: Re: Stream Pipes: how to use them on V.3/386 Keywords: Sysv /dev/spx: ask and ye shall receive Message-ID: <523@banyan.UUCP> Date: 26 Sep 89 21:38:16 GMT References: <405@belltec.UUCP> Reply-To: gil@banyan.com Organization: Banyan Systems, Inc. Lines: 35 In article <405@belltec.UUCP> jom@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@banyan.com Banyan Systems Inc. (617) 898-1196 115 Flanders Road Westboro, MA 01581 -=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-