Skip to content

Fix reading data from pipes

Yuri Nesterov requested to merge nesterov/waypipe:fix-pipe-64kb into master

Apparently, there is a problem with reading data from pipes when the transferred data size is larger than 64 KB. The easiest way to reproduce this issue is by using the wl-clipboard utilities:

  1. Execute wl-copy < test.jpg, where test.jpg is larger than 64 KB.
  2. On the other end execute wl-paste using waypipe.
  3. Waypipe freezes indefinitely.

It seems that, currently, pipes become readable only when poll returns POLLHUP. This occurs when the compositor sends a small amount of data and closes the pipe. However, when the data size is larger than 64 KB, the pipe remains open and is never read because the POLLIN event is never requested. This patch resolves the issue.

Merge request reports

Loading