From b65c72c45c79c3f1fea6446c83f6ac47e813a52a Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 5 Mar 2014 23:28:32 +0000 Subject: [PATCH] Restore SunOS fix, noticed by Greg Onufer. --- server-client.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server-client.c b/server-client.c index 07ef5697..4ffcb3a0 100644 --- a/server-client.c +++ b/server-client.c @@ -540,8 +540,18 @@ server_client_check_resize(struct window_pane *wp) ws.ws_col = wp->sx; ws.ws_row = wp->sy; - if (ioctl(wp->fd, TIOCSWINSZ, &ws) == -1) + if (ioctl(wp->fd, TIOCSWINSZ, &ws) == -1) { +#ifdef __sun + /* + * Some versions of Solaris apparently can return an error when + * resizing; don't know why this happens, can't reproduce on + * other platforms and ignoring it doesn't seem to cause any + * issues. + */ + if (errno != EINVAL) +#endif fatal("ioctl failed"); + } wp->flags &= ~PANE_RESIZE; }