diff options
author | Branden Robinson <branden@debian.org> | 2004-03-22 17:19:47 -0500 |
---|---|---|
committer | Sung-Jin Park <sj76.park@samsung.com> | 2013-09-02 23:32:30 -0400 |
commit | 58504d81f7e7fb91ccc185d3f20b04e4090ae2e8 (patch) | |
tree | edc4a640afc740f74f283d0087040139e40e576b | |
parent | 40604fdc3f6c91aaa49277d7981d37f9f0f30179 (diff) | |
download | xev-58504d81f7e7fb91ccc185d3f20b04e4090ae2e8.tar.gz xev-58504d81f7e7fb91ccc185d3f20b04e4090ae2e8.tar.bz2 xev-58504d81f7e7fb91ccc185d3f20b04e4090ae2e8.zip |
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 <http://bugs.debian.org/238638>
Change-Id: I361d7e2fb008edcf99b1ca2d57cde62380393a95
-rw-r--r-- | xev.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1065,6 +1065,7 @@ main (int argc, char **argv) printf ("Unknown event type %d\n", event.type); break; } + fflush(stdout); } XCloseDisplay (dpy); |