Messages in this thread | | | Subject | Re: [PATCH] atime on devices | From | Sturle Sunde <> | Date | Wed, 16 Jun 2004 17:30:34 +0200 |
| |
Jan-Benedict Glaw <jbglaw@lug-owl.de> writes: > On Wed, 2004-06-09 16:20:17 +0200, Sturle Sunde <sturle.sunde@usit.uio.no> > wrote in message <riqhdtkke3i.fsf@maggie.uio.no>: >> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |