aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2015-02-12 18:14:03 +0100
committerMarc Schink <swo-dev@marcschink.de>2015-02-12 19:04:19 +0100
commitd776e0fb286eb2475b8d6ded1afff73a8d00f102 (patch)
treeaea57797818b7776abf3c6428f2b4b2d85a74b48
parent1789cced5ee06bbe658a07a897271252c48fbbf9 (diff)
Disable buffering of standard input.
This enables real-time trace analysis from standard input.
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 1c00615..9f2486c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -344,6 +344,9 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
+ if (!input_file)
+ g_io_channel_set_buffered(input, FALSE);
+
ret = libswo_init(&ctx, NULL, BUFFER_SIZE * 2);
if (ret != LIBSWO_OK) {