aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-23 06:05:02 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-23 06:05:02 +0000
commit64caf59e84c3ae1c06773bb8ec91165eeedabe6d (patch)
tree0f10d742fde77ea6c07b28a3675caaad14595db8 /tmux.h
parent0a9005678da04b1e7783d26b02041e3973f26127 (diff)
downloadrtmux-64caf59e84c3ae1c06773bb8ec91165eeedabe6d.tar.gz
rtmux-64caf59e84c3ae1c06773bb8ec91165eeedabe6d.tar.bz2
rtmux-64caf59e84c3ae1c06773bb8ec91165eeedabe6d.zip
Don't attempt to open() the tty path, rely on the client sending its stdin fd
with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init instead of tty_open to prevent them leaking into child processes if any are created between the two calls. This bumps the protocol version, so the tmux server should be killed before upgrading.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/tmux.h b/tmux.h
index 0ffb0b53..bdaf5f6e 100644
--- a/tmux.h
+++ b/tmux.h
@@ -19,7 +19,7 @@
#ifndef TMUX_H
#define TMUX_H
-#define PROTOCOL_VERSION 1
+#define PROTOCOL_VERSION 2
#include <sys/param.h>
#include <sys/time.h>
@@ -328,8 +328,6 @@ struct msg_command_data {
};
struct msg_identify_data {
- char tty[TTY_NAME_MAX];
-
char cwd[MAXPATHLEN];
char term[TERMINAL_LENGTH];
@@ -1200,7 +1198,7 @@ void tty_putcode2(struct tty *, enum tty_code_code, int, int);
void tty_puts(struct tty *, const char *);
void tty_putc(struct tty *, u_char);
void tty_pututf8(struct tty *, const struct grid_utf8 *);
-void tty_init(struct tty *, int, char *, char *);
+void tty_init(struct tty *, int, char *);
void tty_start_tty(struct tty *);
void tty_stop_tty(struct tty *);
void tty_detect_utf8(struct tty *);