X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Ftty.c;h=991a148de0cfe1417a98d14dac16d8d3eeab1ebd;hp=30d476559f6c32a3604f5495d90a4a54ac9ab005;hb=25bd6734790c31d9f239ccac2aa1218ee071f6d0;hpb=b8fe6a04df91e9e84efe350b1d63e26588fd2fed diff --git a/pppd/tty.c b/pppd/tty.c index 30d4765..991a148 100644 --- a/pppd/tty.c +++ b/pppd/tty.c @@ -68,7 +68,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: tty.c,v 1.19 2004/11/06 05:42:29 paulus Exp $" +#define RCSID "$Id: tty.c,v 1.20 2004/11/12 09:51:23 paulus Exp $" #include #include @@ -644,6 +644,12 @@ int connect_tty() } else if (notty) { if (!start_charshunt(0, 1)) goto errret; + dup2(fd_devnull, 0); + dup2(fd_devnull, 1); + if (log_to_fd == 1) + log_to_fd = -1; + if (log_to_fd != 2) + dup2(fd_devnull, 2); } else if (record_file != NULL) { int fd = dup(ttyfd); if (!start_charshunt(fd, fd))