From 711d5dea20679298192b25a5bbfe4fd70d9012d6 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 1 Sep 2011 16:09:18 +0200 Subject: Add configuration option to run the GC on exit If "auto_gc" is enabled, the garbage collector for note files will be run on every exit. As this is an experimental feature and may cause data loss, this is disabled by default. Signed-off-by: Lukas Fleischer --- src/io.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/io.c') diff --git a/src/io.c b/src/io.c index c71934a..c3a6a61 100644 --- a/src/io.c +++ b/src/io.c @@ -867,6 +867,11 @@ io_save_conf (struct conf *conf) (void)fprintf (fp, "auto_save="); (void)fprintf (fp, "%s\n", (conf->auto_save) ? "yes" : "no"); + (void)fprintf (fp, "\n# If this option is set to yes, " + "the GC is run automatically when quitting\n"); + (void)fprintf (fp, "auto_gc="); + (void)fprintf (fp, "%s\n", (conf->auto_gc) ? "yes" : "no"); + (void)fprintf (fp, "\n# If not null, perform automatic saves every " "'periodic_save' minutes\n"); (void)fprintf (fp, "periodic_save="); -- cgit v1.2.3-54-g00ecf