title: linux -- concurrently reading/writing from/to a file
body: <p>Linux is strange for me, I am thinking how to code my program to safely operate linux files.
  what aspects should I regard if my program operate(open, read or write) to a file(normal file or dev file and so on) that is being operated by other process.
  can you give me some ideas, or suggest me any helpful articles/links ?</p>