diff options
-rw-r--r-- | broadcast.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/broadcast.c b/broadcast.c index e5957ae..afea3e4 100644 --- a/broadcast.c +++ b/broadcast.c @@ -54,6 +54,10 @@ int main(int argc, char *argv[]) { int local = STDERR_FILENO; int remote = STDOUT_FILENO; + if (isatty(remote)) { + errx(EX_USAGE, "stdout is not redirected"); + } + error = tcgetattr(local, &saveTerm); if (error) err(EX_IOERR, "tcgetattr"); atexit(restoreTerm); |