[Nottingham] named pipes (fifo) help please

Duncan John Fyfe djf at star.le.ac.uk
Wed Oct 26 16:51:23 BST 2005


On Wed, 2005-10-26 at 16:09 +0100, Martin wrote:
> Folks,
> 
> I want to use a named pipe to let a second process read at random times 
> the "latest results" from a first process...
> 
> What's the best/easiest way to avoid the first (writing) process 
> blocking on the pipe if the second process doesn't read for a long time?
> 
> What I'm really after is just for the latest line of output to be picked 
> up by the second process without risking a partial read if I use a text 
> file for example instead of the pipe...
> 

A problem with pipes (mkfifo) in thic scenario is they are buffered  so
procress 2 might have to wait along time to receive output from process
1 if it is only occasional output.

Have fun,
Duncan


-- 
Duncan John Fyfe <djf at star.le.ac.uk>




More information about the Nottingham mailing list