From: Michael Stapelberg Date: Sat, 28 Feb 2009 01:17:55 +0000 (+0100) Subject: Correctly disable buffering for stdout X-Git-Tag: 3.a~137 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cdb92e6a495fef05ffaed7e4072cf51734daf8cf;p=i3%2Fi3 Correctly disable buffering for stdout --- 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]);