From 5c80a0957df5d218f8fe9019228a039ad5e6f077 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 21 Feb 2011 13:29:45 +1100 Subject: [PATCH] Add usage() to failure to read stdin/out. --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index b397850..c8c46e2 100644 --- a/main.c +++ b/main.c @@ -912,10 +912,12 @@ int main(int argc, char *argv[]) if (!FORCE_REPLACE) { if (STDIN && isatty(fileno((FILE *)stdin))) { print_err("Will not read stdin from a terminal. Use -f to override.\n"); + usage(); exit (1); } if (STDIN && isatty(fileno((FILE *)stdout))) { print_err("Will not write stdout to a terminal. Use -f to override.\n"); + usage(); exit (1); } }