X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftap.c;h=4bb695ef4ebcccd6a1bd26182b46e28aa394c7a5;hb=fe566790e6be3f27f0befd85b715a3e84977bf6c;hp=a54fd178d12f96cf9a32ac591754526c4149e4b4;hpb=e2b465757cadd72353b3ce4ae2b9402d66750e3b;p=ust.git diff --git a/tests/tap.c b/tests/tap.c index a54fd17..4bb695e 100644 --- a/tests/tap.c +++ b/tests/tap.c @@ -58,6 +58,9 @@ static void tap_comment_stdout(void) goto close_pipe; } + /* Set it before we create the reading thread */ + setlinebuf(pipe_r_file); + stdout_fileno = fileno(stdout); if (stdout_fileno < 0) { perror("# Couldn't get fileno for stdout!?"); @@ -112,7 +115,7 @@ static void tap_comment_stdout(void) setlinebuf(stdout); setlinebuf(stderr); - setlinebuf(pipe_r_file); + return;