[Gllug] pipes and C++

David L Neil GLLUG at GetAroundToIt.co.uk
Sun Sep 12 21:09:30 UTC 2010


Adrian McMenamin wrote:
> I have been chaining three C++ programs I have written together -
> working on the principle that each should do one thing - so
> A - generates some xml
> B - processes said xml
> C - outputs graphics
> A | B | C
> All works well - but now I want to have them repeat this every few
> seconds ie for every three seconds
> A --r 3 | B --r 3 | C --r 3
> But while it is easy to get the first program to churn out the xml I
> cannot work out how to get the second element in the chain to recognise
> the end of the output - (I am guessing that previously B didn't really
> start until A was dead?)

create ABC.sh as
A | B | C

now ABC.sh --r 3   ???

However I'd be nervous about the possibility (which may not exist in 
your application) of A(t=2) starting before B(t=1) or C(t=1) have finished.

Consider message queuing cf pipelining?

Regards,
=dn



-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list