]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - stdout.c
stdin/stdout: Only set nonblock flags for non-tty fds.
[paraslash.git] / stdout.c
index 29db2b7e3e28f050d72577a6d8b533c18ed54be8..b26661594a940373fe5e6bd20e67c54607e70b4c 100644 (file)
--- a/stdout.c
+++ b/stdout.c
@@ -96,6 +96,7 @@ void stdout_task_register(struct stdout_task *sot, struct sched *s)
                exit(EXIT_FAILURE);
        }
        sot->fd_flags = ret;
-       sot->must_set_nonblock_flag = (sot->fd_flags & O_NONBLOCK) == 0;
+       sot->must_set_nonblock_flag = (sot->fd_flags & O_NONBLOCK) == 0
+               && !isatty(STDOUT_FILENO);
        sot->task = task_register(&ti, s);
 }