summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-06-28 22:10:42 +0000
committernicm <nicm@openbsd.org>2010-06-28 22:10:42 +0000
commit7b0139187dfcebfd64f68139bfb309bbd07bea3c (patch)
tree88366cfcc5decb48386110959952af25ad5e8eec /usr.bin/tmux/tmux.h
parentclock_gettime(CLOCK_PROF) didn't account for the time between the last (diff)
downloadwireguard-openbsd-7b0139187dfcebfd64f68139bfb309bbd07bea3c.tar.xz
wireguard-openbsd-7b0139187dfcebfd64f68139bfb309bbd07bea3c.zip
Send all three of stdin, stdout, stderr from the client to the server, so that
commands can directly make use of them. This means that load-buffer and save-buffer can have "-" as the file to read from stdin or write to stdout. This is a protocol version bump so the tmux server will need to be restarted after upgrade (or an older client used).
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r--usr.bin/tmux/tmux.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 0767b4acf6d..fae4023fe27 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.230 2010/06/27 02:56:59 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.231 2010/06/28 22:10:42 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -19,7 +19,7 @@
#ifndef TMUX_H
#define TMUX_H
-#define PROTOCOL_VERSION 5
+#define PROTOCOL_VERSION 6
#include <sys/param.h>
#include <sys/time.h>
@@ -68,7 +68,6 @@ extern char **environ;
*/
#define COMMAND_LENGTH 2048 /* packed argv size */
#define TERMINAL_LENGTH 128 /* length of TERM environment variable */
-#define PRINT_LENGTH 512 /* printed error/message size */
#define ENVIRON_LENGTH 1024 /* environment variable length */
/*
@@ -373,7 +372,9 @@ enum msgtype {
MSG_ENVIRON,
MSG_UNLOCK,
MSG_LOCK,
- MSG_SHELL
+ MSG_SHELL,
+ MSG_STDERR,
+ MSG_STDOUT,
};
/*
@@ -381,10 +382,6 @@ enum msgtype {
*
* Don't forget to bump PROTOCOL_VERSION if any of these change!
*/
-struct msg_print_data {
- char msg[PRINT_LENGTH];
-};
-
struct msg_command_data {
pid_t pid; /* pid from $TMUX or -1 */
u_int idx; /* index from $TMUX */
@@ -1080,6 +1077,10 @@ struct client {
char *cwd;
struct tty tty;
+ FILE *stdin_file;
+ FILE *stdout_file;
+ FILE *stderr_file;
+
struct event repeat_timer;
struct timeval status_timer;