Check FIONREAD for all panes not just piped panes, fixes issues with

tests, GitHub issue 4807.
This commit is contained in:
nicm
2026-05-12 09:37:25 +00:00
parent 27a00d1bfd
commit 9e3653a612
3 changed files with 6 additions and 8 deletions

View File

@@ -376,12 +376,10 @@ window_pane_destroy_ready(struct window_pane *wp)
{
int n;
if (wp->pipe_fd != -1) {
if (EVBUFFER_LENGTH(wp->pipe_event->output) != 0)
return (0);
if (ioctl(wp->fd, FIONREAD, &n) != -1 && n > 0)
return (0);
}
if (wp->pipe_fd != -1 && EVBUFFER_LENGTH(wp->pipe_event->output) != 0)
return (0);
if (ioctl(wp->fd, FIONREAD, &n) != -1 && n > 0)
return (0);
if (~wp->flags & PANE_EXITED)
return (0);