summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-03-13 21:22:09 +0000
committerbrian <brian@FreeBSD.org>1997-03-13 21:22:09 +0000
commitd14412c59dead9d8b503bd8c6cbbde710b76e7cd (patch)
tree5382fdc918a7ddd746a4479e346c565cf86d909e /usr.sbin/ppp/lcp.c
parentdb004d74c87a0b50369d35291f1901c6f4746444 (diff)
downloadFreeBSD-src-d14412c59dead9d8b503bd8c6cbbde710b76e7cd.zip
FreeBSD-src-d14412c59dead9d8b503bd8c6cbbde710b76e7cd.tar.gz
Closes pr 2711
Fix -background option. Parent returns after the line is established (or not established). Definitely a candidate for 2.2
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r--usr.sbin/ppp/lcp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index 428fa11..13b9f30 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id$
+ * $Id: lcp.c,v 1.12 1997/02/22 16:10:23 peter Exp $
*
* TODO:
* o Validate magic number received from peer.
@@ -123,6 +123,15 @@ int new;
IpcpOpen();
CcpUp();
CcpOpen();
+ if (mode & MODE_BACKGROUND && BGFiledes[1] != -1) {
+ char c = EX_NORMAL;
+ if (write(BGFiledes[1],&c,1) == 1)
+ LogPrintf(LOG_PHASE_BIT,"Parent notified of success.\n");
+ else
+ LogPrintf(LOG_PHASE_BIT,"Failed to notify parent of success.\n");
+ close(BGFiledes[1]);
+ BGFiledes[1] = -1;
+ }
break;
case PHASE_DEAD:
if (mode & MODE_DIRECT)
OpenPOWER on IntegriCloud