RCS file: /home/jdp/f5/pptp/cvs/pptp/pptp.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -r1.1.1.1 -r1.3 --- pptp.c 1999/04/28 19:36:57 1.1.1.1 +++ pptp.c 1999/04/29 17:05:59 1.3 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "pptp_callmgr.h" #include "pptp_gre.h" @@ -235,13 +236,23 @@ void launch_pppd(char *ttydev, int argc, char **argv) { char *new_argv[argc+4]; /* XXX if not using GCC, hard code a limit here. */ int i; + int newi = 0; - new_argv[0] = PPPD_BINARY; - new_argv[1] = ttydev; - new_argv[2] = "38400"; + new_argv[newi++] = PPPD_BINARY; +#ifdef USER_PPP + new_argv[newi++] = "-direct"; + if ((i = open(ttydev, O_RDWR)) == -1) + fatal("Cannot open %s: %s", ttydev, strerror(errno)); + if (dup2(i, 0) == -1) + fatal("dup2 failed: %s", strerror(errno)); + close(i); +#else + new_argv[newi++] = ttydev; + new_argv[newi++] = "38400"; +#endif for (i=0; i