Skip to content
Snippets Groups Projects
Commit 622ae73b authored by Marek Vavruša's avatar Marek Vavruša
Browse files

daemon: duplicate command output to both remote and logs

parent 77616841
Branches
Tags
No related merge requests found
......@@ -66,7 +66,11 @@ static void tty_read(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf)
if (lua_gettop(L) > 0) {
message = lua_tostring(L, -1);
}
fprintf(ret ? outerr : out, "%s\n> ", message);
if (stream_fd != STDIN_FILENO) {
fprintf(stdout, "%s\n", cmd); /* Duplicate command to logs */
fprintf(out, "%s\n> ", message); /* Duplicate output to sender */
}
fprintf(ret ? stderr : stdout, "%s\n> ", message);
lua_settop(L, 0);
free(buf->base);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment