9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Axel Belinfante <Axel.Belinfante@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
Date: Sun,  3 Sep 2006 21:09:30 +0200	[thread overview]
Message-ID: <200609031909.k83J9UV23187@demeter.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Fri, 01 Sep 2006 15:35:21 +0100." <c09ca9e1b0405cfce345df13bb408add@vitanuova.com>

> > 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.


  parent reply	other threads:[~2006-09-03 19:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 22:46 Axel Belinfante
2006-08-30 23:05 ` geoff
2006-08-31 16:26 ` "Nils O. Selåsdal"
2006-08-31 19:55   ` Axel Belinfante
2006-08-31 20:15     ` rog
2006-08-31 20:24       ` Axel Belinfante
2006-08-31 20:24     ` rog
2006-08-31 20:45       ` Axel Belinfante
2006-09-01  3:43     ` geoff
2006-09-01 10:57       ` rog
2006-09-01 14:35 ` rog
2006-09-01 15:33   ` Skip Tavakkolian
2006-09-01 15:59     ` rog
2006-09-01 18:42       ` Skip Tavakkolian
2006-09-03 19:09   ` Axel Belinfante [this message]
2006-09-04 14:52     ` Gorka guardiola
2006-09-04 20:50       ` Gorka guardiola
2006-09-04 19:26     ` Skip Tavakkolian
2006-09-04 20:25       ` Francisco J Ballesteros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609031909.k83J9UV23187@demeter.cs.utwente.nl \
    --to=axel.belinfante@cs.utwente.nl \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).