server: Fix brown paper bag bug in generic_com_on().
[paraslash.git] / stdin.c
diff --git a/stdin.c b/stdin.c
index a66ad469c2d648a875d4e8f1ce6917606a18967d..9408235a045a6767e2acf443208d95196990d379 100644 (file)
--- a/stdin.c
+++ b/stdin.c
@@ -1,12 +1,7 @@
-/*
- * Copyright (C) 2006-2014 Andre Noll <maan@systemlinux.org>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2006 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
 /** \file stdin.c Functions that deal with reading from stdin. */
 
-#include <assert.h>
 #include <regex.h>
 
 #include "para.h"
@@ -115,6 +110,7 @@ void stdin_task_register(struct stdin_task *sit, struct sched *s)
                exit(EXIT_FAILURE);
        }
        sit->fd_flags = ret;
-       sit->must_set_nonblock_flag = (sit->fd_flags & O_NONBLOCK) == 0;
+       sit->must_set_nonblock_flag = (sit->fd_flags & O_NONBLOCK) == 0
+               && !isatty(STDIN_FILENO);
        sit->task = task_register(&ti, s);
 }