node.js - text alignment bug when using "tail -F foo.log" which is being written to from multiple sources -
i seeing weird "bug" whereby when tail file using tail -f foo.log
, of content indented wrong way, first 20 or characters getting truncated. seen before? weird , not sure why it's happening. of text aligned correctly, , isn't.
the file being written multiple node.js processes, can pretty guarantee none of processes truncated first ~20 characters before writing file!
my hypothesis because multiple processes writing same file , of processes using 'w' flag , others using 'a' flag, might cause corruption? corruption consistent/deterministic each time.
looks due writing same file same process using 'a' , 'w' flags - write in text file without overwriting in fs node js