From: Nikolai Kondrashov <spbn...@gmail.com> Force line buffering for test and test_xi2 to increase interactiveness and avoid losing data with non-terminal stdout. This fixes capturing xinput test* output into a file.
Signed-off-by: Nikolai Kondrashov <spbn...@gmail.com> Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> --- src/test.c | 2 ++ src/test_xi2.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/test.c b/src/test.c index 97305c5..0c95501 100644 --- a/src/test.c +++ b/src/test.c @@ -98,6 +98,8 @@ print_events(Display *dpy) { XEvent Event; + setlinebuf(stdout); + while(1) { XNextEvent(dpy, &Event); diff --git a/src/test_xi2.c b/src/test_xi2.c index bcb4880..04e1004 100644 --- a/src/test_xi2.c +++ b/src/test_xi2.c @@ -326,6 +326,8 @@ test_xi2(Display *display, int deviceid = -1; int rc; + setlinebuf(stdout); + rc = list(display, argc, argv, name, desc); if (rc != EXIT_SUCCESS) return rc; -- 1.7.11.2 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel