On 10 August 2015 at 21:17, Giacomo Tesio <giacomo@tesio.it> wrote:
Zero can either mean EOF or "I'm alive but boring".
 
I can't see how a reliable communication (a cpu connection for example) can survive this mismatch.
I'm probably missing something.

A specialised reader and writer can always agree that it means something else in a particular case,
but the general convention is that zero (empty record) means you've hit the end of a sequence of records (if write boundaries are preserved)
or the end of a sequence of bytes (if write boundaries are not preserved), and thus end of file.
In other words, the interpretation is the traditional one from UNIX and other systems.

It isn't intended as a general "keep-alive" mechanism. That's why the read9pmsg case is odd,
and why I think the comment and code are wrong.

You could for instance use it to send several distinct byte streams through a pipe, but only to a specialised reader.