diff options
author | Brian Somers <brian@FreeBSD.org> | 1998-12-10 18:36:30 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1998-12-10 18:36:30 +0000 |
commit | 991c2a7b75a28e8f349e172f94266fdf95973f4e (patch) | |
tree | 74eddb2f2557bd22a6a436b8f0f34b3fe605635b /usr.sbin/ppp/main.c | |
parent | db21d4f4fc6f5865c16397f84cea6c40629d3086 (diff) | |
download | src-991c2a7b75a28e8f349e172f94266fdf95973f4e.tar.gz src-991c2a7b75a28e8f349e172f94266fdf95973f4e.zip |
When using ``set device !someprogram'', when ``someprogram''
exits, it causes a select() exception.
Handle these select() exceptions on link descriptors in pretty
much the same way as loss of carrier rather than dropping out
in confusion.
Notes
Notes:
svn path=/head/; revision=41654
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r-- | usr.sbin/ppp/main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index 218d193ff2e1..b9cf61d4f0fd 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.144 1998/10/22 02:32:49 brian Exp $ + * $Id: main.c,v 1.145 1998/10/31 17:38:46 brian Exp $ * * TODO: */ @@ -515,8 +515,12 @@ DoLoop(struct bundle *bundle) for (i = 0; i <= nfds; i++) if (FD_ISSET(i, &efds)) { - log_Printf(LogERROR, "Exception detected on descriptor %d\n", i); - break; + log_Printf(LogPHASE, "Exception detected on descriptor %d\n", i); + /* We deal gracefully with link descriptor exceptions */ + if (!bundle_Exception(bundle, i)) { + log_Printf(LogERROR, "Exception cannot be handled !\n"); + break; + } } if (i <= nfds) |