mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-26 01:40:12 -05:00
render: resize: don't try to signal TIOCSWINSZ on a closed ptmx FD
This commit is contained in:
parent
5639082113
commit
8fd7c837f7
1 changed files with 1 additions and 1 deletions
2
render.c
2
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue