title: using files as IPC on linux
body: <p>I have one writer which creates and sometimes updates a file with some status information. The readers are implemented in lua (so I got only <code>io.open</code>) and possibly bash (<code>cat</code>, <code>grep</code>, whatever). I am worried about what would happen if the status information is updated (which means a complete file rewrite) while a reader has an open handle to the file: what can happen? <a href="https://stackoverflow.com/questions/4624071/pipe-buffer-size-is-4k-or-64k">I have also read</a> that if the write/read operation is below 4KB, it is atomic: that would be perfectly fine for me, as the status info can fit well in such dimension. Can I make this assumption?</p>