The logger meets linux-kernel
The logger meets linux-kernel
Posted Jan 4, 2012 23:21 UTC (Wed) by neilbrown (subscriber, #359)In reply to: The logger meets linux-kernel by mezcalero
Parent article: The logger meets linux-kernel
I think /proc and /sys have taught us that many thing are not like "a normal file".
I imagine that when you open and write, the message simply gets appended - i.e. O_APPEND is forced.
When you open and read you just read from the start of the ring. When you get to the end you get EOF, though you can use 'poll' to find out when more data is available (in the same way that various /sys and /proc files support 'poll').
The important difference to a char device is that you can O_CREATE new ones.