diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 18:59:12 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-08-16 18:59:12 +0000 |
commit | f415d43c3b5cb6f519b171949a6a3eeaacbf6540 (patch) | |
tree | f591d6ce7494850f85da15e78c4d0b03525465cb /window.c | |
parent | 8f9858ba2f2fa410b8e0c20a7763517b6610fcb0 (diff) | |
download | rtmux-f415d43c3b5cb6f519b171949a6a3eeaacbf6540.tar.gz rtmux-f415d43c3b5cb6f519b171949a6a3eeaacbf6540.tar.bz2 rtmux-f415d43c3b5cb6f519b171949a6a3eeaacbf6540.zip |
Sync OpenBSD patchset 254:
When creating a new session from the command-line where there is an external
terminal, copy the termios(4) special characters and use them for new windows
created in the new session. Suggested by Theo.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.102 2009-08-14 21:28:00 tcunha Exp $ */ +/* $Id: window.c,v 1.103 2009-08-16 18:59:12 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -267,7 +267,8 @@ window_create1(u_int sx, u_int sy) struct window * window_create(const char *name, const char *cmd, const char *cwd, - struct environ *env, u_int sx, u_int sy, u_int hlimit, char **cause) + struct environ *env, struct termios *tio, u_int sx, u_int sy, u_int hlimit, + char **cause) { struct window *w; struct window_pane *wp; @@ -275,7 +276,7 @@ window_create(const char *name, const char *cmd, const char *cwd, w = window_create1(sx, sy); wp = window_add_pane(w, hlimit); layout_init(w); - if (window_pane_spawn(wp, cmd, cwd, env, cause) != 0) { + if (window_pane_spawn(wp, cmd, cwd, env, tio, cause) != 0) { window_destroy(w); return (NULL); } @@ -468,8 +469,8 @@ window_pane_destroy(struct window_pane *wp) } int -window_pane_spawn(struct window_pane *wp, - const char *cmd, const char *cwd, struct environ *env, char **cause) +window_pane_spawn(struct window_pane *wp, const char *cmd, + const char *cwd, struct environ *env, struct termios *tio, char **cause) { struct winsize ws; int mode; @@ -503,7 +504,7 @@ window_pane_spawn(struct window_pane *wp, tv.tv_usec = NAME_INTERVAL * 1000L; timeradd(&wp->window->name_timer, &tv, &wp->window->name_timer); - switch (wp->pid = forkpty(&wp->fd, wp->tty, NULL, &ws)) { + switch (wp->pid = forkpty(&wp->fd, wp->tty, tio, &ws)) { case -1: wp->fd = -1; xasprintf(cause, "%s: %s", cmd, strerror(errno)); |