diff options
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/server-client.c b/server-client.c index 8739b5ab..27efc57d 100644 --- a/server-client.c +++ b/server-client.c @@ -22,7 +22,6 @@ #include <errno.h> #include <event.h> #include <fcntl.h> -#include <paths.h> #include <stdlib.h> #include <string.h> #include <time.h> @@ -768,8 +767,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 && errno != ENXIO) +#endif fatal("ioctl failed"); + } wp->flags &= ~PANE_RESIZE; } @@ -1226,6 +1235,11 @@ server_client_msg_identify(struct client *c, struct imsg *imsg) return; c->flags |= CLIENT_IDENTIFIED; +#ifdef __CYGWIN__ + c->fd = open(c->ttyname, O_RDWR|O_NOCTTY); + c->cwd = open(".", O_RDONLY); +#endif + if (c->flags & CLIENT_CONTROL) { c->stdin_callback = control_callback; |