From cdb92e6a495fef05ffaed7e4072cf51734daf8cf Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 28 Feb 2009 02:17:55 +0100 Subject: [PATCH] Correctly disable buffering for stdout --- src/mainx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainx.c b/src/mainx.c index 9a900396..114e471f 100644 --- a/src/mainx.c +++ b/src/mainx.c @@ -282,7 +282,8 @@ int main(int argc, char *argv[], char *env[]) { xcb_window_t root; xcb_intern_atom_cookie_t atom_cookies[NUM_ATOMS]; - if (!isatty(stdout)) + /* Disable output buffering to make redirects in .xsession actually useful for debugging */ + if (!isatty(fileno(stdout))) setbuf(stdout, NULL); application_path = sstrdup(argv[0]); -- 2.39.5