-/*
- * Copyright (C) 2006-2014 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. */
-#include <assert.h>
-
#include "para.h"
#include "list.h"
#include "sched.h"
.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);
}