about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-01-03 19:01:35 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-01-03 19:01:55 +0100
commitbe6ae5b9b9f05c04de982f7ea6ee980a47714773 (patch)
treec73914cf12d858d44f5a4142450d3ceb65a3c2be
parentf7d7c7ebe688113c7d1a42d6eaa25ef90e443efc (diff)
downloadrdd-be6ae5b9b9f05c04de982f7ea6ee980a47714773.tar.gz
rdd-be6ae5b9b9f05c04de982f7ea6ee980a47714773.tar.xz
rdd-be6ae5b9b9f05c04de982f7ea6ee980a47714773.zip
rdd: don't dump to tty
-rw-r--r--rdd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rdd.c b/rdd.c
index e6eb523..4a12032 100644
--- a/rdd.c
+++ b/rdd.c
@@ -32,6 +32,9 @@ usage:
 	if (argc > optind)
 		goto usage;
 
+	if (isatty(1))
+		fail(5, "cowardly not dumping to tty\n");
+
 	if ((fd = open(src, O_RDONLY)) < 0)
 		fail(2, "failed to open random source\n");