Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ames!pacbell!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: pipes under streams Message-ID: <8752@chinet.chi.il.us> Date: 22 Jun 89 14:20:23 GMT References: <256@unix.SRI.COM> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 21 In article <256@unix.SRI.COM> unix.sri.com!orawest!brian writes: > >How hard would it be to write a streams driver for named pipes? >How about regular pipes? I want to sleep until data arrives from one >of several processes - is this possible under V.3.2 Unix? The way to do this using only normal FIFO's is to have all processes write their data to a single FIFO. If necessary, put the data in packets with a tag to identify where it came from (the packet should be <= PIPE_BUF in size and written in a single write()). You may need separate processes to collect from each source stream and generate the packets. I'm working on something similar but need to have high and low priority inputs. There will be a large volume of low priority input and I need a way to prevent it from filling the FIFO and making the high priority processes block. Can someone suggest a way to do this without adding a lot of overhead? Perhaps the low priority process could stat() the FIFO before each write and wait awhile unless it is nearly empty. Les Mikesell