diff options
author | brian <brian@FreeBSD.org> | 1997-09-18 00:15:25 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-09-18 00:15:25 +0000 |
commit | 109ba0ca66db09790df1c93e4ee1ba2239344d64 (patch) | |
tree | a0ec2e562371373382e6209313c3346ffb0d802e /usr.sbin/ppp/modem.c | |
parent | af684d25950567ee4267a2074d25148ffd8b29fc (diff) | |
download | FreeBSD-src-109ba0ca66db09790df1c93e4ee1ba2239344d64.zip FreeBSD-src-109ba0ca66db09790df1c93e4ee1ba2239344d64.tar.gz |
Don't close(1) in direct mode and then proceed to
isatty(1) ! Keep 0 open for this till the modem's
been set up by either dup()ing 0 or by opening
ctermid(NULL) (if isatty(0)).
Discussed problem with: Tomi Vainio <tomppa@fidata.fi>
Made it finally dawn on me: Angelo Turetta <ATuretta@stylo.it>
Diffstat (limited to 'usr.sbin/ppp/modem.c')
-rw-r--r-- | usr.sbin/ppp/modem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c index 61248ae..35f52b2 100644 --- a/usr.sbin/ppp/modem.c +++ b/usr.sbin/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.51 1997/09/10 02:20:30 brian Exp $ + * $Id: modem.c,v 1.52 1997/09/16 23:15:14 brian Exp $ * * TODO: */ @@ -454,7 +454,7 @@ OpenModem(int mode) } else { /* must be a tcp connection */ LogPrintf(LogDEBUG, "OpenModem(direct): Modem is not a tty\n"); - return modem = dup(1); + return modem = dup(0); } } else { if (strncmp(VarDevice, "/dev/", 5) == 0) { |