---
 lib/lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
From d94458a3de4e58c7007eb27c02660aad93acc669 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Sat, 9 Mar 2019 15:32:46 -0800
Subject: [PATCH] Add missing isatty(3) call.

---
 lib/lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.21.0.360.g471c308f928-goog

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to