i3-dump-log -f: switch from pthreads to UNIX sockets

fixes #4117
This commit is contained in:
Michael Stapelberg
2021-01-15 16:12:55 +01:00
committed by Michael Stapelberg
parent 131a6158c8
commit dcd6079c9b
14 changed files with 142 additions and 82 deletions

View File

@ -12,10 +12,6 @@
#include <config.h>
#if !defined(__OpenBSD__)
#include <pthread.h>
#endif
/* Default shmlog size if not set by user. */
extern const int default_shmlog_size;
@ -39,11 +35,4 @@ typedef struct i3_shmlog_header {
* coincidentally be exactly the same as previously). Overflows can happen
* and dont matter — clients use an equality check (==). */
uint32_t wrap_count;
#if !defined(__OpenBSD__)
/* pthread condvar which will be broadcasted whenever there is a new
* message in the log. i3-dump-log uses this to implement -f (follow, like
* tail -f) in an efficient way. */
pthread_cond_t condvar;
#endif
} i3_shmlog_header;