]> xenbits.xensource.com Git - libvirt.git/commitdiff
Limit virsh history entries to 500 (Jim Paris)
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 9 Feb 2009 10:24:27 +0000 (10:24 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 9 Feb 2009 10:24:27 +0000 (10:24 +0000)
ChangeLog
src/virsh.c

index 416de6f9fe1308bcd4e9f6c05e928aedb3b196c2..63c2b3b0ff5b7c2808e45890d4cdf4a926d2196e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb  9 10:21:33 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
+
+       * 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 <agx@sigxcpu.org>
 
        * src/qemu_driver.c (qemudStartVMDaemon, qemudDomainSuspend,
index e6d434e34a359dacc903e54e0a5f733feb35c658..ad2dae06e6920960009927c943be543b970b3fb3 100644 (file)
@@ -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 *