From: Michael Stapelberg Date: Thu, 4 Oct 2012 15:05:08 +0000 (+0200) Subject: shmlog: Remove O_TRUNC flag for shm_open, we truncate ourselves X-Git-Tag: 4.4~83 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2eeb2a10672802f8a485d061f7d265ec0619af7c;p=i3%2Fi3 shmlog: Remove O_TRUNC flag for shm_open, we truncate ourselves --- diff --git a/src/log.c b/src/log.c index 16fa0bed..42e714ef 100644 --- a/src/log.c +++ b/src/log.c @@ -108,7 +108,7 @@ void init_logging(void) { #endif logbuffer_size = min(physical_mem_bytes * 0.01, shmlog_size); sasprintf(&shmlogname, "/i3-log-%d", getpid()); - logbuffer_shm = shm_open(shmlogname, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE); + logbuffer_shm = shm_open(shmlogname, O_RDWR | O_CREAT, S_IREAD | S_IWRITE); if (logbuffer_shm == -1) { ELOG("Could not shm_open SHM segment for the i3 log: %s\n", strerror(errno)); return;