Commit Graph

7 Commits

Author SHA1 Message Date
Michael Stapelberg d3beff2339 make i3bar use libi3’s root_atom_contents()
This removes code duplication, which will be useful for a subsequent
commit.

Furthermore, we now don’t open X11 connections unnecessarily in some
corner cases.
2013-11-22 15:48:45 +01:00
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