A trick with perl

Andrew Pimlott andrew at pimlott.net
Sun Jan 4 15:20:38 CET 2004


On Sun, Jan 04, 2004 at 01:21:42AM -0800, Chris Fortune wrote:
> Hello Andrew,
> 
> You said :
> "
>   > You're heading for headaches because a pipe can only buffer so much
>   > input, so your program will hang when you have a long message.
> "
> But I did some tests and was able to make several large FIFO files, the
> largest being over 105Mb with perfect data integrity, and without hanging.

That's great, but I'm fairly sure it is not possible with the code
you posted.  One, you created the "fifo" with "mknod $file b", which
is not correct.  Two, I had forgotten that even an open for write on
a fifo will block until a reader is attached.  So the code you
posted can't even make it past the open call.

Anyhow, I'm glad it works, but it is good to be aware of the
possibility for deadlock when using pipes.

Andrew




More information about the Bogofilter mailing list