summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-03-25 20:06:08 +0000
committerbrian <brian@FreeBSD.org>2001-03-25 20:06:08 +0000
commit56ef9e4cd8f5da5e8f87bba2c9b6b9b2ac7431cb (patch)
treed0a1a3252f37cc1eba070b82747af66fe96b3f1d
parent2009fd4382a919bf28f461c803fbd51c50c9d097 (diff)
downloadFreeBSD-src-56ef9e4cd8f5da5e8f87bba2c9b6b9b2ac7431cb.zip
FreeBSD-src-56ef9e4cd8f5da5e8f87bba2c9b6b9b2ac7431cb.tar.gz
Issue a ``quit'' after other ppp commands given on the command line and
then wait for the connection to be closed by the peer. This means that commands such as ``pppctl ... show links'' will display the correct output again (rather than truncating it depending on how much data arrived in the last packet).
-rw-r--r--usr.sbin/pppctl/pppctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/pppctl/pppctl.c b/usr.sbin/pppctl/pppctl.c
index 3f14a6b..753b32e 100644
--- a/usr.sbin/pppctl/pppctl.c
+++ b/usr.sbin/pppctl/pppctl.c
@@ -623,6 +623,11 @@ main(int argc, char **argv)
start = ++next;
} while (next && *next);
if (verbose)
+ write(1, "quit\n", 5);
+ write(fd, "quit\n", 5);
+ while (Receive(fd, verbose | REC_SHOW) == 0)
+ ;
+ if (verbose)
puts("");
}
break;
OpenPOWER on IntegriCloud