diff options
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -8,6 +8,7 @@ #include <sys/stat.h> #include <sys/wait.h> +#include <sys/ioctl.h> #include <sys/epoll.h> #include <sys/eventfd.h> #include <sys/timerfd.h> @@ -759,6 +760,13 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper, goto close_fds; } + if (ioctl(ptmx, TIOCSWINSZ, + &(struct winsize){.ws_row = 24, .ws_col = 80}) < 0) + { + LOG_ERRNO("failed to set initial TIOCSWINSZ"); + goto close_fds; + } + int ptmx_flags; if ((ptmx_flags = fcntl(ptmx, F_GETFL)) < 0 || fcntl(ptmx, F_SETFL, ptmx_flags | O_NONBLOCK) < 0) |
