Re: [PATCH] atime on devices

From: Sturle Sunde
Date: Wed Jun 16 2004 - 11:09:27 EST


Jan-Benedict Glaw <jbglaw@xxxxxxxxxx> writes:
> On Wed, 2004-06-09 16:20:17 +0200, Sturle Sunde <sturle.sunde@xxxxxxxxxxx>
> wrote in message <riqhdtkke3i.fsf@xxxxxxxxxxxxx>:
>> Some software use access times on device files to check if there is
>> mouse or keyboard activity on the console. This used to work in old
>> kernels, or perhaps it was old hardware, but not any more. Google
>> didn't find any other portable ways of checking for mouse or keyboard
>> activity without accessing the X11 display.
> open() /dev/input/evdev* and select() on them?

Requires root privileges, and you can't see how long the device was
idle before you did select.

--
Sturle
~~~~~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/