Messages in this thread | | | From | Kay Sievers <> | Date | Sun, 8 Jul 2012 02:33:45 +0200 | Subject | Re: Regression - /proc/kmsg does not (always) block for 1-byte reads |
| |
On Sat, Jul 7, 2012 at 12:05 AM, Jukka Ollila <jiiksteri@gmail.com> wrote: > And I did a little digging. According to the Debian package tracking > system[1] it would seem that the _stable_ distro carries a version > that doesn't do the dd shuffling at all and probably runs its klogd as > root, reading /proc/kmsg directly. That may or may not work with > 3.5-rc kernels, depending on how big its reads are. I'm CCing the > listed maintainer just in case. > > The unstable version does the problematic dd bs=1 trick. Also the > Ubuntu diff in the PTS has the dd. But I have no idea how Ubuntu does > it's release management. Not to mention other derivatives.
Just a note, unrelated to fixing the issue:
/proc/kmsg can be opened many times, but it never behaved too well when this was done.
The processes might wake up at the same time, but only one of them gets the data. If someone does a "cat /proc/kmsg' in parallel, the read() in dd might return 0 and dd will exit. And this is not a recent change, it was always the case.
Using dd here is a pretty silly idea for many reasons.
Kay
| |