From: Daniel P. Berrange Date: Mon, 9 Feb 2009 10:24:27 +0000 (+0000) Subject: Limit virsh history entries to 500 (Jim Paris) X-Git-Tag: LIBVIRT_0_6_1~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1290b28f5925312ac85c38642db7167cc9ace418;p=thirdparty%2Flibvirt.git Limit virsh history entries to 500 (Jim Paris) --- diff --git a/ChangeLog b/ChangeLog index 416de6f9fe..63c2b3b0ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 9 10:21:33 GMT 2009 Daniel P. Berrange + + * src/virsh.c: Limit readonly history to 500 to avoid unbounded + growth in memory usage (Jim Paris) + Sat Feb 7 21:46:06 CET 2009 Guido Günther * src/qemu_driver.c (qemudStartVMDaemon, qemudDomainSuspend, diff --git a/src/virsh.c b/src/virsh.c index e6d434e34a..ad2dae06e6 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -6784,6 +6784,9 @@ vshReadlineInit(void) /* Tell the completer that we want a crack first. */ rl_attempted_completion_function = vshReadlineCompletion; + + /* Limit the total size of the history buffer */ + stifle_history(500); } static char *