aboutsummaryrefslogtreecommitdiff
path: root/i3-dump-log
diff options
context:
space:
mode:
authorAxel Wagner <mail@merovius.de>2012-12-14 01:27:34 +0100
committerMichael Stapelberg <michael@stapelberg.de>2012-12-14 21:46:40 +0100
commit4273db04445046499f6e259678665b917498d29b (patch)
tree226fc3f4a793442c3384d5294646e4abf9998d99 /i3-dump-log
parent61a5b9ddd4806cd65820717dd3d0e3fda8a68cba (diff)
downloadi3-4273db04445046499f6e259678665b917498d29b.tar.gz
i3-4273db04445046499f6e259678665b917498d29b.zip
i3-dump-log: Correct comment to reflect truth
Diffstat (limited to 'i3-dump-log')
-rw-r--r--i3-dump-log/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/i3-dump-log/main.c b/i3-dump-log/main.c
index 48465c75..4a11d218 100644
--- a/i3-dump-log/main.c
+++ b/i3-dump-log/main.c
@@ -121,7 +121,7 @@ int main(int argc, char *argv[]) {
struct stat statbuf;
- /* NB: While we must never read, we need O_RDWR for the pthread condvar. */
+ /* NB: While we must never write, we need O_RDWR for the pthread condvar. */
int logbuffer_shm = shm_open(shmname, O_RDWR, 0);
if (logbuffer_shm == -1)
err(EXIT_FAILURE, "Could not shm_open SHM segment for the i3 log (%s)", shmname);
@@ -129,7 +129,7 @@ int main(int argc, char *argv[]) {
if (fstat(logbuffer_shm, &statbuf) != 0)
err(EXIT_FAILURE, "stat(%s)", shmname);
- /* NB: While we must never read, we need O_RDWR for the pthread condvar. */
+ /* NB: While we must never write, we need PROT_WRITE for the pthread condvar. */
logbuffer = mmap(NULL, statbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, logbuffer_shm, 0);
if (logbuffer == MAP_FAILED)
err(EXIT_FAILURE, "Could not mmap SHM segment for the i3 log");