+
+ /* Initialize with 0-bytes, just to be sure… */
+ memset(logbuffer, '\0', logbuffer_size);
+
+ header = (i3_shmlog_header*)logbuffer;
+
+ pthread_condattr_t cond_attr;
+ pthread_condattr_init(&cond_attr);
+ if (pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED) != 0)
+ ELOG("pthread_condattr_setpshared() failed, i3-dump-log -f will not work!\n");
+ pthread_cond_init(&(header->condvar), &cond_attr);
+