--- openrc-0.4.3.bak/src/rc/rc-logger.c 2009-02-11 07:55:19.000000000 +0100 +++ openrc-0.4.3/src/rc/rc-logger.c 2009-04-03 00:04:03.000000000 +0200 @@ -150,9 +150,6 @@ int i; FILE *log = NULL; - if (!isatty(STDOUT_FILENO)) - return; - if (!rc_conf_yesno("rc_logger")) return; @@ -163,12 +160,19 @@ fcntl (signal_pipe[i], F_SETFD, s | FD_CLOEXEC) == -1)) eerrorx("fcntl: %s", strerror (errno)); - tcgetattr(STDOUT_FILENO, &tt); - ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws); - - /* /dev/pts may not be available yet */ - if (openpty(&rc_logger_tty, &slave_tty, NULL, &tt, &ws)) - return; + if (isatty(STDOUT_FILENO)) + { + tcgetattr(STDOUT_FILENO, &tt); + ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws); + + /* /dev/pts may not be available yet */ + if (openpty(&rc_logger_tty, &slave_tty, NULL, &tt, &ws)) + return; + } + else + /* /dev/pts may not be available yet */ + if (openpty(&rc_logger_tty, &slave_tty, NULL, NULL, NULL)) + return; if ((s = fcntl(rc_logger_tty, F_GETFD, 0)) == 0) fcntl(rc_logger_tty, F_SETFD, s | FD_CLOEXEC);