aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-03-09 15:32:46 -0800
committerRob Landley <rob@landley.net>2019-03-10 19:38:57 -0500
commit0a4963242631c5424a1a3bca2b3092ff6bf54a6e (patch)
tree7c306d6045d3ca91e6c9e1052bcad7798b096aab /lib
parentfe12fb5146a8e6ad9a873a700aa6f7c01adf3064 (diff)
downloadtoybox-0a4963242631c5424a1a3bca2b3092ff6bf54a6e.tar.gz
Add missing isatty(3) call.
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 8937c57a..a6114321 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -1470,7 +1470,7 @@ void loggit(int priority, char *format, ...)
int i, facility = LOG_DAEMON;
va_list va;
- for (i = 0; i<3; i++) facility = LOG_AUTH;
+ for (i = 0; i<3; i++) if (isatty(i)) facility = LOG_AUTH;
openlog(toys.which->name, LOG_PID, facility);
va_start(va, format);
vsyslog(priority, format, va);