diff options
author | brian <brian@FreeBSD.org> | 1997-07-01 21:31:28 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-07-01 21:31:28 +0000 |
commit | 067015aaaee82b76de0d5b02d8947bd837c5b395 (patch) | |
tree | 0b553b7ea2fc6bd68ca1cff748d026ade2432cdb /usr.sbin/ppp/main.c | |
parent | 87c1696b92a3f849fe7793a676228df4eeae1e4d (diff) | |
download | FreeBSD-src-067015aaaee82b76de0d5b02d8947bd837c5b395.zip FreeBSD-src-067015aaaee82b76de0d5b02d8947bd837c5b395.tar.gz |
Make HUP cause an exit (as it used to), and make
INT cause a hangup - not exiting for -ddial & -auto.
HUP must exit because init sends this at system shutdown
time (why, I don't know), and we don't want to end up
redialing after the HUP (due to another dfilter packet).
Pointed out by and discussed with: ache
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r-- | usr.sbin/ppp/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index 36f6ee9..75ad657 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/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.67 1997/06/25 19:30:01 brian Exp $ + * $Id: main.c,v 1.68 1997/06/29 13:54:31 brian Exp $ * * TODO: * o Add commands for traffic summary, version display, etc. @@ -192,11 +192,11 @@ int excode; } static void -Hangup(signo) +CloseConnection(signo) int signo; { /* NOTE, these are manual, we've done a setsid() */ - LogPrintf(LogPHASE, "Hangup: Caught signal %d, abort connection\n", signo); + LogPrintf(LogPHASE, "Caught signal %d, abort connection\n", signo); reconnectState = RECON_FALSE; \ reconnectCount = 0; \ DownConnection(); @@ -366,9 +366,9 @@ char **argv; tcgetattr(0, &oldtio); /* Save original tty mode */ - pending_signal(SIGHUP, Hangup); + pending_signal(SIGHUP, CloseSession); pending_signal(SIGTERM, CloseSession); - pending_signal(SIGINT, CloseSession); + pending_signal(SIGINT, CloseConnection); pending_signal(SIGQUIT, CloseSession); #ifdef SIGPIPE signal(SIGPIPE, SIG_IGN); |