title: Writing and reading to linux /proc/... filesystem without lseek()
body: <p>In this source code <a href="http://man7.org/tlpi/code/online/dist/sysinfo/procfs_pidmax.c.html">http://man7.org/tlpi/code/online/dist/sysinfo/procfs_pidmax.c.html</a> the file <code>/proc/sys/kernel/pid_max</code> is first simply read (using the <code>read</code> syscall) and then simply written (using the <code>write</code> syscall).</p>
  
  <p>Why is it no necessary to <code>lseek</code> to the beginning before writing? I thought the file-offset pointer is the same for read's and write's (that's what the author of the associated books says).</p>