Sync OpenBSD patchset 248:
Sync OpenBSD patchset 248:

imsg closes the fd after sending, so dup() STDIN_FILENO before passing it to
the parent, otherwise TIOCGWINSZ will fail when the window is resized (that
could actually be moved into the server but this is more future-proof and
avoids breaking the protocol).


klaxalk/tmux,klaxalk/tmux,klaxalk/tmux,klaxalk/tmux,klaxalk/tmux