diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index cf7d84fe..9ee56812 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -326,6 +326,9 @@ guac_terminal* guac_terminal_create(guac_client* client, return NULL; } + /* Init pipe stream (output to display by default) */ + term->pipe_stream = NULL; + /* Init terminal lock */ pthread_mutex_init(&(term->lock), NULL); diff --git a/src/terminal/terminal.h b/src/terminal/terminal.h index 488692d6..3b244ae0 100644 --- a/src/terminal/terminal.h +++ b/src/terminal/terminal.h @@ -149,6 +149,13 @@ struct guac_terminal { */ int stdin_pipe_fd[2]; + /** + * The currently-open pipe stream to which all terminal output should be + * written, if any. If no pipe stream is open, terminal output will be + * written to the terminal display, and this value will be NULL. + */ + guac_stream* pipe_stream; + /** * Graphical representation of the current scroll state. */