Browse Source

Hide output if the application is non interactive

master
Andrea Luzzardi 17 years ago
parent
commit
9a752ff0e0
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      pam_usb/src/log.c

+ 3
- 0
pam_usb/src/log.c View File

@ -16,6 +16,7 @@
*/
#include <stdio.h>
#include <unistd.h>
#include <syslog.h>
#include <stdarg.h>
#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)


Loading…
Cancel
Save