diff options
author | ache <ache@FreeBSD.org> | 1996-03-12 12:56:27 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-03-12 12:56:27 +0000 |
commit | c018beaf94340a079e45651f1a27ad9d3dcb1258 (patch) | |
tree | 052c5ddf0b017a11fa5cb9273ac18816c1d691ae /sbin | |
parent | ee6c90f5c0b055a4bd0469ed771364276392a872 (diff) | |
download | FreeBSD-src-c018beaf94340a079e45651f1a27ad9d3dcb1258.zip FreeBSD-src-c018beaf94340a079e45651f1a27ad9d3dcb1258.tar.gz |
Re-open line after hangup in any case
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/slattach/slattach.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index a115f3e..05b2354 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -449,13 +449,12 @@ void configure_network() /* sighup_handler() is invoked when carrier drops, eg. before redial. */ void sighup_handler() { - int ttydisc = TTYDISC; - if(exiting) return; again: + acquire_line(); /* reopen dead line */ + /* invoke a shell for redial_cmd or punt. */ if (redial_cmd) { - acquire_line(); setup_line(CLOCAL); syslog(LOG_NOTICE,"SIGHUP on %s (sl%d); running %s", dev,unit,redial_cmd); @@ -489,18 +488,6 @@ again: } else setup_line(0); } else { -#if 0 - /* - * XXX should do this except we are called from main() via - * kill(getpid(), SIGHUP). Ick. - */ - syslog(LOG_NOTICE, "SIGHUP on %s (sl%d); exiting", dev, unit); - exit_handler(0); -#endif - if (ioctl(fd, TIOCSETD, &ttydisc) < 0) { - syslog(LOG_ERR, "ioctl(TIOCSETD): %m"); - exit_handler(1); - } setup_line(0); /* restore ospeed from hangup (B0) */ /* If modem control, just wait for carrier before attaching. If no modem control, just fall through immediately. */ |