summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-save-buffer.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-05-21 18:27:42 +0000
committernicm <nicm@openbsd.org>2012-05-21 18:27:42 +0000
commitc66f86655c6fadcc1187e2959e1d6a44d8f2843d (patch)
treed01e827dadc8eb53b4828f8b99351c2f7ad4859e /usr.bin/tmux/cmd-save-buffer.c
parentCleanup O_CLOEXEC handling and make sure UF_EXCLOSE is set correctly (diff)
downloadwireguard-openbsd-c66f86655c6fadcc1187e2959e1d6a44d8f2843d.tar.xz
wireguard-openbsd-c66f86655c6fadcc1187e2959e1d6a44d8f2843d.zip
Instead of passing stdin/stdout/stderr file descriptors over imsg and
handling them in the server, handle them in the client and pass buffers over imsg. This is much tidier for some upcoming changes and the performance hit isn't critical. The tty fd is still passed to the server as before. This bumps the tmux protocol version so new clients and old servers are incompatible.
Diffstat (limited to 'usr.bin/tmux/cmd-save-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-save-buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-save-buffer.c b/usr.bin/tmux/cmd-save-buffer.c
index ae0e2f7bc41..05675b3bf7b 100644
--- a/usr.bin/tmux/cmd-save-buffer.c
+++ b/usr.bin/tmux/cmd-save-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-save-buffer.c,v 1.13 2012/03/21 19:16:07 nicm Exp $ */
+/* $OpenBSD: cmd-save-buffer.c,v 1.14 2012/05/21 18:27:42 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -79,7 +79,8 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
ctx->error(ctx, "%s: can't write to stdout", path);
return (-1);
}
- bufferevent_write(c->stdout_event, pb->data, pb->size);
+ evbuffer_add(c->stdout_data, pb->data, pb->size);
+ server_push_stdout(c);
} else {
if (c != NULL)
wd = c->cwd;