aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-27 16:23:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-27 16:23:35 +0000
commit8fd7c837f7691c07272412cf1492bff02d0d7548 (patch)
tree29ac3184550a36db83dc99328fc7f3262d8e06a0 /render.c
parentMerge branch 'hold-option-in-footclient' (diff)
render: resize: don't try to signal TIOCSWINSZ on a closed ptmx FD
Diffstat (limited to 'render.c')
-rw-r--r--render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/render.c b/render.c
index cf2bdaa4..46bb459c 100644
--- a/render.c
+++ b/render.c
@@ -1844,7 +1844,7 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
term->margins.left, term->margins.right, term->margins.top, term->margins.bottom);
/* Signal TIOCSWINSZ */
- if (ioctl(term->ptmx, TIOCSWINSZ,
+ if (term->ptmx >= 0 && ioctl(term->ptmx, TIOCSWINSZ,
&(struct winsize){
.ws_row = term->rows,
.ws_col = term->cols,