From: Michael Stapelberg Date: Sat, 10 Dec 2011 11:15:57 +0000 (+0000) Subject: fix the SHM log size X-Git-Tag: 4.2~194^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f7a73f4a6871244d546f6cd8e0295e5666185758;p=i3%2Fi3 fix the SHM log size --- 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;