mirror of
https://github.com/tmux/tmux.git
synced 2026-10-06 17:49:52 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: When destroying pane, also close pipe and destroy its event. GitHub issue 5424.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: cmd-pipe-pane.c,v 1.63 2026/04/28 08:47:55 nicm Exp $ */
|
/* $OpenBSD: cmd-pipe-pane.c,v 1.64 2026/07/27 14:25:46 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -194,9 +194,13 @@ static void
|
|||||||
cmd_pipe_pane_read_callback(__unused struct bufferevent *bufev, void *data)
|
cmd_pipe_pane_read_callback(__unused struct bufferevent *bufev, void *data)
|
||||||
{
|
{
|
||||||
struct window_pane *wp = data;
|
struct window_pane *wp = data;
|
||||||
struct evbuffer *evb = wp->pipe_event->input;
|
struct evbuffer *evb;
|
||||||
size_t available;
|
size_t available;
|
||||||
|
|
||||||
|
if (wp->pipe_event == NULL)
|
||||||
|
return;
|
||||||
|
evb = wp->pipe_event->input;
|
||||||
|
|
||||||
available = EVBUFFER_LENGTH(evb);
|
available = EVBUFFER_LENGTH(evb);
|
||||||
log_debug("%%%u pipe read %zu", wp->id, available);
|
log_debug("%%%u pipe read %zu", wp->id, available);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: server-fn.c,v 1.148 2026/07/14 19:07:03 nicm Exp $ */
|
/* $OpenBSD: server-fn.c,v 1.149 2026/07/27 14:25:46 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -371,6 +371,12 @@ server_destroy_pane(struct window_pane *wp, int notify)
|
|||||||
close(wp->fd);
|
close(wp->fd);
|
||||||
wp->fd = -1;
|
wp->fd = -1;
|
||||||
}
|
}
|
||||||
|
if (wp->pipe_fd != -1) {
|
||||||
|
bufferevent_free(wp->pipe_event);
|
||||||
|
wp->pipe_event = NULL;
|
||||||
|
close(wp->pipe_fd);
|
||||||
|
wp->pipe_fd = -1;
|
||||||
|
}
|
||||||
|
|
||||||
remain_on_exit = options_get_number(wp->options, "remain-on-exit");
|
remain_on_exit = options_get_number(wp->options, "remain-on-exit");
|
||||||
if (remain_on_exit != 0 && (~wp->flags & PANE_STATUSREADY))
|
if (remain_on_exit != 0 && (~wp->flags & PANE_STATUSREADY))
|
||||||
|
|||||||
Reference in New Issue
Block a user