diff options
author | nicm <nicm> | 2020-05-24 09:13:06 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-24 09:13:06 +0000 |
commit | 6c829827110c6616c8abe8cb3ef9e9ed0a1dbd7d (patch) | |
tree | 5de239b7d8c9f5acf79d1eb17462c03487f0d239 /cmd-new-session.c | |
parent | 033d6472cb71e82be75aae6682031ef3b711226a (diff) | |
download | rtmux-6c829827110c6616c8abe8cb3ef9e9ed0a1dbd7d.tar.gz rtmux-6c829827110c6616c8abe8cb3ef9e9ed0a1dbd7d.tar.bz2 rtmux-6c829827110c6616c8abe8cb3ef9e9ed0a1dbd7d.zip |
Now the tty has a pointer back to the client there is no point (and a
bit confusing) in it keeping a copy of the fd as well. Remove it.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r-- | cmd-new-session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c index a9a0376b..be29122d 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -165,13 +165,13 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) * the terminal as that calls tcsetattr() to prepare for tmux taking * over. */ - if (!detached && !already_attached && c->tty.fd != -1) { + if (!detached && !already_attached && c->fd != -1) { if (server_client_check_nested(cmdq_get_client(item))) { cmdq_error(item, "sessions should be nested with care, " "unset $TMUX to force"); goto fail; } - if (tcgetattr(c->tty.fd, &tio) != 0) + if (tcgetattr(c->fd, &tio) != 0) fatal("tcgetattr failed"); tiop = &tio; } else |