[ale] Named Pipe

David Corbin dcorbin at machturtle.com
Tue Mar 20 18:08:42 EDT 2007


On Tuesday 20 March 2007 16:54, JK wrote:
> David Corbin wrote:
> > I have an application for which a named pipe seems like the right answer
> > on several fronts, but what I don't want is for the writing application
> > to block if there is noone reading it.  I just want one application to
> > stream data to the pipe, and have some other application be able to jump
> > in 'mid-stream' and start processing the input data.
> >
> > Is this possible with linux named pipes?
>
> I don't think so -- I think if you set a pipe to non-blocking
> mode, writes that would over-fill the pipe just fail. (I
> could be wrong, haven't looked at the Stevens book in a long
> time.) Therefore, whatever starts reading the pipe could get
> some really old data.
>
> I think a series of UDP messages sent to a particular local
> port would work almost as well.  When nothing's listening
> on the port, you may get failed writes, but whenever something
> *does* start listening, it will get the latest data, not
> stuff that's been sitting there since a pipe filled.

This sounds like the best idea for me in this case. But thanks CF for your 
tips and suggestion on making pipes do what I need.  It's been filed away in 
the dustbin I call a brain.



More information about the Ale mailing list