From 4adfc09f0c5284230de2acd11110a68bb4c00f26 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Sat, 1 Sep 2007 18:04:03 +0000 Subject: [PATCH] Hide output if the application is non interactive --- src/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/log.c b/src/log.c index aa633db..1e99cc5 100644 --- a/src/log.c +++ b/src/log.c @@ -16,6 +16,7 @@ */ #include +#include #include #include #include "conf.h" @@ -32,6 +33,8 @@ static void pusb_log_syslog(int level, const char *format, va_list ap) static void pusb_log_output(int level, const char *format, va_list ap) { + if (!isatty(fileno(stdin))) + return ; if (pusb_opts && !pusb_opts->quiet) { if (pusb_opts && pusb_opts->color_log)