Rewrite the code for reading and writing files. Now, if the client is

not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.
This commit is contained in:
nicm
2019-12-12 11:39:56 +00:00
parent 64fb7e472a
commit c284ebe0ad
13 changed files with 955 additions and 501 deletions

View File

@ -54,7 +54,7 @@ control_notify_input(struct client *c, struct window_pane *wp,
else
evbuffer_add_printf(message, "%c", buf[i]);
}
control_write_buffer(c, message);
control_write(c, "%s", EVBUFFER_DATA(message));
evbuffer_free(message);
}
}