Re: [PATCH 5/6] vcs: poll(): cope with a deallocated vt

From: Nicolas Pitre
Date: Wed Jan 09 2019 - 19:13:26 EST


On Tue, 8 Jan 2019, Nicolas Pitre wrote:

> When VT_DISALLOCATE is used on a vt, user space waiting with poll() on
> the corresponding /dev/vcs device is not awakened. This is now fixed by
> returning POLLHUP|POLLERR to user space.
>
> Also, in the normal screen update case, we don't set POLLERR anymore as
> POLLPRI alone is a much more logical response in a non-error situation,
> saving some confusion on the user space side. The only known user app
> making use of poll() on /dev/vcs* is BRLTTY which is known to cope with
> that change already, so the risk of breakage is pretty much nonexistent.
>
> Signed-off-by: Nicolas Pitre <nico@xxxxxxxxxx>

That patch introduced a small unwanted behavior change that I intend to
fix in a follow-up patch (it will be tagged [PATCH 7/6]). I prefer to go
with a separate patch rather than respinning this one as this gives me
the opportunity to separately document said behavior.

Nicolas