Avoid warning about sys/sysctl.h on glibc-2.30.
[paraslash.git] / stdout.c
index 43e194dbca5d672936997ac97b94820892ca5a12..1f7791094a33a961c193c273a4c09e9b16f2be07 100644 (file)
--- a/stdout.c
+++ b/stdout.c
@@ -1,8 +1,4 @@
-/*
- * Copyright (C) 2006 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2006 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
 /** \file stdout.c Functions that deal with writing to stdout. */
 
@@ -96,6 +92,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);
 }