diff options
author | hannken <hannken@cvs.openbsd.org> | 1995-12-28 14:05:07 +0000 |
---|---|---|
committer | hannken <hannken@cvs.openbsd.org> | 1995-12-28 14:05:07 +0000 |
commit | a127415b8670e51724f2441727ba79863bc2d797 (patch) | |
tree | af6e87ad0dc8168bfd223793be44beef19befb78 /usr.sbin/pppd | |
parent | 11d46c6c2501e7a72a68d5a17262621d443dcb36 (diff) |
Leave DTR down for one second on exit so modem may catch the DTR to false
transition. (from hannken@eis.cs.tu-bs.de)
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r-- | usr.sbin/pppd/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c index 77a643b7173..6a8b6988396 100644 --- a/usr.sbin/pppd/main.c +++ b/usr.sbin/pppd/main.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: main.c,v 1.1 1995/10/18 08:47:59 deraadt Exp $"; +static char rcsid[] = "$Id: main.c,v 1.2 1995/12/28 14:05:06 hannken Exp $"; #endif #include <stdio.h> @@ -582,10 +582,13 @@ void close_fd() { disestablish_ppp(); + sleep(1); /* drop dtr to hang up */ - if (modem) + if (modem) { setdtr(fd, FALSE); + sleep(1); + } if (initfdflags != -1 && fcntl(fd, F_SETFL, initfdflags) < 0) syslog(LOG_WARNING, "Couldn't restore device fd flags: %m"); |