From 58504d81f7e7fb91ccc185d3f20b04e4090ae2e8 Mon Sep 17 00:00:00 2001 From: Branden Robinson Date: Mon, 22 Mar 2004 17:19:47 -0500 Subject: Flush standard output after processing each event When redirecting the output of xev (eg, xev > foo), the output file is truncated on exit due to libc buffering, since xev's exit(0) is unreachable code. Reported by Bill Currie. Debian bug#238638 Change-Id: I361d7e2fb008edcf99b1ca2d57cde62380393a95 --- xev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xev.c b/xev.c index 5b9a5cc..16d45aa 100644 --- a/xev.c +++ b/xev.c @@ -1065,6 +1065,7 @@ main (int argc, char **argv) printf ("Unknown event type %d\n", event.type); break; } + fflush(stdout); } XCloseDisplay (dpy); -- cgit v1.2.3