On Thu, Aug 12, 2010 at 09:34:04AM -0700, Felix Rosencrantz wrote:
> I see problems when I exit from a shell that causes a window to close,
> or a session end:
>
> 1) When I close a window by exiting it's shell, and tmux is forced to
> switch me to the next window in a session, it stops showing output
> from the terminal, and no longer echos the keys I type in the switched
> to window. Though it seems to echo spaces for most keys I press, and
> delete seems to backspace over them. Output from shell commands are
> not shown. When I switch to another window, and then back to the
> window that wasn't showing output, the output is there, and echoing is
> working again.
someone else saw this but i could never reproduce
> 2) When closing a window causes a session to end, and tmux returns me
> to the shell that attached to the session, my terminal doesn't appear
> to have been properly initialized, since linefeed's are not printing
> properly.(The reset command fixes things.)
may be related. sounds like the tty socket is getting closed before tmux
has a chance to reset it. try this and send the -vvvvv debug output from
reproducing, don't forget to restart tmux entirely:
Index: tty.c
===================================================================
RCS file: /cvsroot/tmux/tmux/tty.c,v
retrieving revision 1.193
diff -u -p -r1.193 tty.c
--- tty.c 11 Aug 2010 22:16:04 -0000 1.193
+++ tty.c 13 Aug 2010 07:35:32 -0000
@@ -225,8 +225,10 @@ tty_stop_tty(struct tty *tty)
struct winsize ws;
int mode;
- if (!(tty->flags & TTY_STARTED))
+ if (!(tty->flags & TTY_STARTED)) {
+ log_debug("%s: %p not started", __func__, tty);
return;
+ }
tty->flags &= ~TTY_STARTED;
bufferevent_disable(tty->event, EV_READ|EV_WRITE);
@@ -236,10 +238,14 @@ tty_stop_tty(struct tty *tty)
* because the fd is invalid. Things like ssh -t can easily leave us
* with a dead tty.
*/
- if (ioctl(tty->fd, TIOCGWINSZ, &ws) == -1)
+ if (ioctl(tty->fd, TIOCGWINSZ, &ws) == -1) {
+ log_debug("%p ioctl: %s", tty, strerror(errno));
return;
- if (tcsetattr(tty->fd, TCSANOW, &tty->tio) == -1)
+ }
+ if (tcsetattr(tty->fd, TCSANOW, &tty->tio) == -1) {
+ log_debug("%p tcsetattr: %s", tty, strerror(errno));
return;
+ }
tty_raw(tty, tty_term_string2(tty->term, TTYC_CSR, 0, ws.ws_row - 1));
tty_raw(tty, tty_term_string(tty->term, TTYC_RMACS));
>
> So there appears to be a bug with exiting from a window.
>
> I'm using the latest version from git on linux, with the libevent-1.4.14b
> -FR,
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> tmux-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tmux-users
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users