diff options
Diffstat (limited to 'server-client.c')
-rw-r--r-- | server-client.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/server-client.c b/server-client.c index 72b5d312..94548724 100644 --- a/server-client.c +++ b/server-client.c @@ -23,8 +23,6 @@ #include <errno.h> #include <event.h> #include <fcntl.h> -#include <imsg.h> -#include <paths.h> #include <stdlib.h> #include <string.h> #include <time.h> @@ -1034,8 +1032,18 @@ server_client_resize_event(__unused int fd, __unused short events, void *data) 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; } @@ -1600,6 +1608,10 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg) c->name = name; log_debug("client %p name is %s", c, c->name); +#ifdef __CYGWIN__ + c->fd = open(c->ttyname, O_RDWR|O_NOCTTY); +#endif + if (c->flags & CLIENT_CONTROL) { c->stdin_callback = control_callback; |