Skip to content

remote-desktop: Check pipe fd before assuming existing read() operation

Quoting the commit message here:

Currently, if g-r-d closes the read end of the pipe for a
SelectionRead() operation, due to realizing that the application, that
should provide the mime type content, does not provide any content,
mutter won't notice that and still assumes that the read() operation
on the pipe in g-r-d is still happening, as mutter never writes to the
pipe in that situation and therefore cannot realize that the pipe is
already closed.
The effect of this is, that if g-r-d aborts a read() operation and
requests a new read() operation via SelectionRead(), mutter will deny
the request since it assumes that the previous read() operation is
still ongoing.

Fix this behaviour by also checking the pipe fd in mutter before
denying a SelectionRead() request.

https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/60

Together with gnome-remote-desktop!46 (merged) this fixes gnome-remote-desktop#60 (closed).
Should be merged together with gnome-remote-desktop!46 (merged).

Edited by Pascal Nowack

Merge request reports