URL: <https://savannah.gnu.org/bugs/?67567>
Summary: 10s timeout during windows closerue
Group: GNU Screen
Submitter: psumbera
Submitted: Thu 02 Oct 2025 09:35:24 AM UTC
Category: Program Logic
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: 5.0.1
Fixed Release: None
Planned Release: None
Work Required: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 02 Oct 2025 09:35:24 AM UTC By: Petr Sumbera <psumbera>
Tested on Solaris 11.4:
screen
<return>
<ctrl>-a c
<ctrl>-d
<ctrl>-d
# it waits for cca 10s before it exits
---
I was able to bisect first bad revision:
https://cgit.git.savannah.gnu.org/cgit/screen.git/commit/?id=4cc0a2897f661d94870071cd93cd4d0bd50429a1
---
When I completely revert the commit, there is no longer the problem:
--- screen-5.0.1/window.c
+++ screen-5.0.1/window.c
@@ -1505,7 +1505,7 @@ WriteString(p, p->w_outbuf, len);
return;
}
- if ((len = read(event->fd, buf, size)) <= 0) {
+ if ((len = read(event->fd, buf, size)) < 0) {
if (errno == EINTR || errno == EAGAIN)
return;
#if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN)
@@ -1527,6 +1527,10 @@ bp++;
len--;
}
#endif
+ if (len == 0) {
+ WindowDied(p, 0, 0);
+ return;
+ }
#ifdef ENABLE_TELNET
if (p->w_type == W_TYPE_TELNET)
len = TelIn(p, bp, len, buf + ARRAY_SIZE(buf) - (bp + len));
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67567>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
