From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200609031909.k83J9UV23187@demeter.cs.utwente.nl> To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] trying to understand how fork/pipe a filtering program In-reply-to: Your message of "Fri, 01 Sep 2006 15:35:21 +0100." References: From: Axel Belinfante MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23183.1157310570.1@demeter.cs.utwente.nl.cs.utwente.nl> Date: Sun, 3 Sep 2006 21:09:30 +0200 Topicbox-Message-UUID: aedbd516-ead1-11e9-9d60-3106f5b1d025 > > I'm just trying to understand what goes on - > > is this the way to do this? if not, what am I missing? > > ahh, having thought about the original question, i finally understand > what was going on. readimage doesn't need EOF, since it knows exactly > how many bytes it needs to read. > hence axel's original program could work without a zero-length write. all true. I did try the zero-length write (should have mentioned that). it did not work with resample (you already suggested this possible in your previous post) I also tried it with cat instead of resample, and then (I think - tried a bit too many variants) it did work. I am using the two pipe solution. regarding Skip's comments: I'm not sure I completely understand. the parallelism is not vital. I just want to use an existing program (resample in this particular case) as filter to read some of my data, process it, and give me the result, after which I continue with my own thing. I could have included the code of the existing program directly in mine (as page does - I actually first lifted that code from page), but then I'd have to track possible changes to that code (I don't suppose there will be many but that's not the point). Axel.