[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1002711: linux-image-5.14.0-4-amd64: poll syscall does not work on some /proc files



On Mon, Dec 27, 2021 at 11:31:21PM +0100, Vincent Danjean wrote:
> On a plain (with more than two bytes) file, the second poll succeed.
> On /proc/bus/input/devices, the second poll hangs.
> Note: this is an old behavior. I initially observe it on an embeded system with
> a 4.1 kernel.

/proc is no real filesystem.  It simply does not support poll, because
the output is generated while you are reading it, so it does not know
when anything changes.  See also
https://unix.stackexchange.com/questions/74713/how-frequently-is-the-proc-file-system-updated-on-linux?rq=1

If you want to know about hardware changes, use udev or listen to kernel
netlink messages.

Bastian

-- 
Earth -- mother of the most beautiful women in the universe.
		-- Apollo, "Who Mourns for Adonais?" stardate 3468.1


Reply to: