X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=stdout.c;h=1f7791094a33a961c193c273a4c09e9b16f2be07;hp=29db2b7e3e28f050d72577a6d8b533c18ed54be8;hb=8f69a1302a52163c61142531c4a6944510c3ec12;hpb=6e0b28e02a1013c019a3225e922b71f913bfbae4 diff --git a/stdout.c b/stdout.c index 29db2b7e..1f779109 100644 --- a/stdout.c +++ b/stdout.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2006 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2006 Andre Noll , see file COPYING. */ /** \file stdout.c Functions that deal with writing to stdout. */ @@ -89,13 +85,14 @@ void stdout_task_register(struct stdout_task *sot, struct sched *s) .name = "stdout", }; - /* See stdin.c for details. */ + /* See \ref stdin.c for details. */ ret = fcntl(STDOUT_FILENO, F_GETFL); if (ret < 0) { PARA_EMERG_LOG("F_GETFL: %s\n", strerror(errno)); 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); }