Commit Graph

6 Commits

Author SHA1 Message Date
Sascha Kruse 5a567057ab i3-dump-log/main.c: error handling for write(...) 2012-12-24 15:11:19 +01:00
Axel Wagner 4273db0444 i3-dump-log: Correct comment to reflect truth 2012-12-14 21:46:40 +01:00
Michael Stapelberg e68a8dd86c shm-logging: implement i3-dump-log -f (follow)
This changes the SHM log format, it doesn’t use 0-bytes to separate
entries anymore. Instead of using lots of printf() calls in i3-dump-log,
we now do precisely one big write().

So, to be clear: i3-dump-log and i3 both need to be upgraded.
Mismatching versions will lead to garbage output (no crashes of i3, just
garbage output).

The -f flag uses an inter-process pthread_cond_t in the shared memory
header to broadcast the arrival of new messages to all i3-dump-log
processes. This internally uses futexes and thus doesn’t even mean a
kernel call in most cases. inter-process pthread_cond_ts require NPTL
(the Native Posix Thread Library, introduce in Linux 2.6).
2012-08-13 01:06:09 +02:00
Michael Stapelberg 1b536d70cc Improve the main error message of i3-dump-log 2012-05-09 19:46:44 +02:00
Michael Stapelberg dee7c07ad2 shmlog: store meta information in the buffer itself, store path as X11 atom
This makes i3-dump-log completely independent of a running i3 instance.
2012-01-06 23:40:07 +00:00
Michael Stapelberg 0af05710b2 add i3-dump-log, a tool to dump the SHM log 2011-12-10 11:27:40 +00:00