diff options
| author | Visal Vijay <150381094+B2krobbery@users.noreply.github.com> | 2026-04-22 02:37:58 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-21 22:07:58 +0100 |
| commit | c9b551f59c6b37d4b877839f7abc62c1e1511b8f (patch) | |
| tree | 7a752516188bd3bfe779ac47e84a2c73b3b77bec /src | |
| parent | 73f48077965d5b895a731c34ab648f73fdb7b2ce (diff) | |
xwayland: handle transient read errors in selection transfer (#14135)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xwayland/XWM.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xwayland/XWM.cpp b/src/xwayland/XWM.cpp index 7e20d9b1..665aedfb 100644 --- a/src/xwayland/XWM.cpp +++ b/src/xwayland/XWM.cpp @@ -1468,6 +1468,11 @@ int SXSelection::onRead(int fd, uint32_t mask) { ssize_t bytesRead = read(fd, transfer->data.data() + oldSize, INCR_CHUNK_SIZE - 1); if (bytesRead < 0) { + if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) { + transfer->data.resize(oldSize); + return 1; + } + Log::logger->log(Log::ERR, "[xwm] readDataSource died"); g_pXWayland->m_wm->selectionSendNotify(&transfer->request, false); transfers.erase(it); |
