From ee01b280507bf1f39a39f9beb574b6653321fd1c Mon Sep 17 00:00:00 2001 From: brian Date: Mon, 19 May 1997 02:00:16 +0000 Subject: Mega update to sort out bad implementations of reconnect & -background. o Fix reconnect anomolies. o Make reconnect apply to failed LQR hangups (& mention in man page). o Make reconnect effective in -background mode. o Listen on socket in -background mode. o Try all phone numbers in -background mode. o Insist on system arg in -background mode. o Make a control-connection close command exit in -background mode. o Output status message to stdout on exit of parent in -background mode. o Don't notify parent of success too soon. o Describe termination EX_* code. o Miscelaneous diagnostic corrections. o Remove redundant connect_time from modem.c. o Don't repeatedly DownConnection(). --- usr.sbin/ppp/os.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ppp/os.c') diff --git a/usr.sbin/ppp/os.c b/usr.sbin/ppp/os.c index c0ffdb8..2bdab3e 100644 --- a/usr.sbin/ppp/os.c +++ b/usr.sbin/ppp/os.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: os.c,v 1.15 1997/04/15 00:03:36 brian Exp $ + * $Id: os.c,v 1.16 1997/05/04 02:39:04 ache Exp $ * */ #include "fsm.h" @@ -186,6 +186,15 @@ OsLinkup() if (linkup == 0) { if (setuid(0) < 0) logprintf("setuid failed\n"); + 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; + } peer_addr = IpcpInfo.his_ipaddr; s = (char *)inet_ntoa(peer_addr); LogPrintf(LOG_LINK_BIT|LOG_LCP_BIT, "OsLinkup: %s\n", s); -- cgit v1.1