summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1999-03-07 01:03:05 +0000
committerbrian <brian@cvs.openbsd.org>1999-03-07 01:03:05 +0000
commitcd359ab9828c016a09008add29cf429a501540ef (patch)
tree6fb6005c3a1b862c2a4ac4f8c4f1dcd1a4d4e7c4 /usr.sbin
parent21e36e0158d5b6fc6b8fba392a14b8f319226a00 (diff)
Reopen descriptor 0 as /dev/tty when in interactive mode
in OpenBSD as well as FreeBSD (I still don't know why). Add a debug diagnostic when creating a child process as a link.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/main.c10
-rw-r--r--usr.sbin/ppp/ppp/modem.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ppp/ppp/main.c b/usr.sbin/ppp/ppp/main.c
index e080e93f8a5..5aa9e32d997 100644
--- a/usr.sbin/ppp/ppp/main.c
+++ b/usr.sbin/ppp/ppp/main.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: main.c,v 1.8 1999/02/06 03:22:41 brian Exp $
+ * $Id: main.c,v 1.9 1999/03/07 01:03:04 brian Exp $
*
* TODO:
*/
@@ -276,11 +276,10 @@ main(int argc, char **argv)
#endif
label = ProcessArgs(argc, argv, &mode, &alias);
-#ifdef __FreeBSD__
/*
- * A FreeBSD hack to dodge a bug in the tty driver that drops output
- * occasionally.... I must find the real reason some time. To display
- * the dodgy behaviour, comment out this bit, make yourself a large
+ * A FreeBSD & OpenBSD hack to dodge a bug in the tty driver that drops
+ * output occasionally.... I must find the real reason some time. To
+ * display the dodgy behaviour, comment out this bit, make yourself a large
* routing table and then run ppp in interactive mode. The `show route'
* command will drop chunks of data !!!
*/
@@ -291,7 +290,6 @@ main(int argc, char **argv)
return 2;
}
}
-#endif
/* Allow output for the moment (except in direct mode) */
if (mode == PHYS_DIRECT)
diff --git a/usr.sbin/ppp/ppp/modem.c b/usr.sbin/ppp/ppp/modem.c
index c48e510aad6..b4fb8f11578 100644
--- a/usr.sbin/ppp/ppp/modem.c
+++ b/usr.sbin/ppp/ppp/modem.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: modem.c,v 1.6 1999/02/26 21:28:24 brian Exp $
+ * $Id: modem.c,v 1.7 1999/03/07 01:03:04 brian Exp $
*
* TODO:
*/
@@ -591,6 +591,8 @@ modem_Open(struct physical *modem, struct bundle *bundle)
close(fids[1]);
modem->fd = fids[0];
waitpid(pid, &stat, 0);
+ log_Printf(LogDEBUG, "Using descriptor %d for child\n",
+ modem->fd);
break;
}
}