X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=stdout.c;h=1f7791094a33a961c193c273a4c09e9b16f2be07;hp=86c2d33b882363711e9ba69a5ee7612d0187a334;hb=0b8b2469b5d2b81ff928bddd10d4ac3b819b75f8;hpb=06cf1943be32153d075ea90a5da12ac93ab2e90a diff --git a/stdout.c b/stdout.c index 86c2d33b..1f779109 100644 --- a/stdout.c +++ b/stdout.c @@ -1,8 +1,4 @@ -/* - * Copyright (C) 2006-2014 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); }