]> git.sur5r.net Git - i3/i3/commitdiff
Correctly disable buffering for stdout
authorMichael Stapelberg <michael+git@stapelberg.de>
Sat, 28 Feb 2009 01:17:55 +0000 (02:17 +0100)
committerMichael Stapelberg <michael+git@stapelberg.de>
Sat, 28 Feb 2009 01:17:55 +0000 (02:17 +0100)
src/mainx.c

index 9a9003963975288b9c042d469af679b065a4d7ae..114e471fee17544697122bc095b23aaa48f08638 100644 (file)
@@ -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]);