From d0dd1d1266af60d10a34a91f28e8bcc156576c7c Mon Sep 17 00:00:00 2001 From: ezra buchla Date: Sat, 2 Jan 2021 18:07:33 -0800 Subject: [PATCH] ws-wrapper prints (#1267) * ws-wrapper prints * ensure ws-wrapper output goes to journal * revert accidental softcut commit change Co-authored-by: emb --- ws-wrapper/src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ws-wrapper/src/main.c b/ws-wrapper/src/main.c index 690a6ddde..744bf5a15 100644 --- a/ws-wrapper/src/main.c +++ b/ws-wrapper/src/main.c @@ -66,6 +66,7 @@ void *loop_tx(void *p) { nb = read(pipe_tx[PIPE_READ], buf, PIPE_BUF_SIZE - 1); if (nb > 0) { buf[nb] = '\0'; + printf("%s", buf); nn_send(sock_ws, buf, nb, 0); } } @@ -176,5 +177,6 @@ int main(int argc, char **argv) { printf("usage: ws-wrapper WS_SOCKET BINARY "); } + setvbuf(stdout, NULL, _IONBF, 0); launch_exe(argc, argv); }