[Nottingham] named pipes (fifo) help please

laccata laccata at ntlworld.com
Wed Oct 26 16:19:49 BST 2005


Martin

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

Either use sockets, so that you can be device independent. do it across 
the globe etc., or just have the first process append to a file, and let 
  the second process read from the file a la tail -f logfile



More information about the Nottingham mailing list