diff options
author | ache <ache@FreeBSD.org> | 1996-03-09 08:18:41 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-03-09 08:18:41 +0000 |
commit | f785271ddafea2eb75061d9de1d5b5bac3f48fb2 (patch) | |
tree | 47e0d9bc793b15289143d3acd7d90353b1d8cce8 /usr.sbin/ppp/modem.c | |
parent | eecb8eb3ab4d2ee26642bae8c0a4fef5a339b7d7 (diff) | |
download | FreeBSD-src-f785271ddafea2eb75061d9de1d5b5bac3f48fb2.zip FreeBSD-src-f785271ddafea2eb75061d9de1d5b5bac3f48fb2.tar.gz |
1) Open /dev/null for std* after setsid() to be shure that modem is
*not* our controlling terminal (SIGHUP can coming in other case)
2) Add HUPCL for non-dedicated lines to be shure that modem
properly resetted.
3) Correct usage string.
Diffstat (limited to 'usr.sbin/ppp/modem.c')
-rw-r--r-- | usr.sbin/ppp/modem.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c index 444c12b..d69d732 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.13 1996/03/08 09:03:07 ache Exp $ + * $Id: modem.c,v 1.14 1996/03/08 12:34:40 ache Exp $ * * TODO: */ @@ -457,6 +457,8 @@ int mode; #else rstio.c_cflag = (CS8 | CREAD | CLOCAL); #endif + if (!(mode & MODE_DEDICATED)) + rstio.c_cflag |= HUPCL; if ((mode & MODE_DIRECT) == 0) { /* * If we are working as direct mode, don't change tty speed. @@ -532,6 +534,8 @@ int modem; modemios = rstio; rstio.c_cflag &= ~(CSIZE|PARENB|PARODD); rstio.c_cflag |= CS8; + if (!(mode & MODE_DEDICATED)) + rstio.c_cflag |= HUPCL; rstio.c_iflag &= ~(ISTRIP|IXON|IXOFF|BRKINT|ICRNL|INLCR); tcsetattr(modem, TCSADRAIN, &rstio); oldflag = fcntl(modem, F_GETFL, 0); |