From f7a73f4a6871244d546f6cd8e0295e5666185758 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 10 Dec 2011 11:15:57 +0000 Subject: [PATCH] fix the SHM log size --- src/log.c | 2 +- src/main.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/log.c b/src/log.c index 69116c7b..05a235fa 100644 --- a/src/log.c +++ b/src/log.c @@ -39,7 +39,7 @@ char *errorfilename; char *shmlogname = ""; /* Size limit for the SHM log, by default 25 MiB. Can be overwritten using the * flag --shmlog-size. */ -int shmlog_size = 25 * 1024 * 1024; +int shmlog_size = 0; /* If enabled, logbuffer will point to a memory mapping of the i3 SHM log. */ static char *logbuffer; /* A pointer (within logbuffer) where data will be written to next. */ diff --git a/src/main.c b/src/main.c index aefdfb27..45cb162c 100644 --- a/src/main.c +++ b/src/main.c @@ -284,8 +284,7 @@ int main(int argc, char *argv[]) { debug_build = ((strchr(I3_VERSION, '(') - I3_VERSION) > 10); /* On non-release builds, disable SHM logging by default. */ - if (!debug_build) - shmlog_size = 0; + shmlog_size = (debug_build ? 25 * 1024 * 1024 : 0); start_argv = argv; -- 2.39.5