]> git.sur5r.net Git - i3/i3/commit
clean up zero-byte logfile on immediate exit
authorJulius Plenz <julius@plenz.com>
Fri, 10 Aug 2012 23:50:37 +0000 (01:50 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 11 Aug 2012 00:23:03 +0000 (02:23 +0200)
commit70ec3867fe0fdf5d97b5680fdb5f670474bceaa7
tree3d0d7f60a86c726b047a45942b345ceca652f741
parentda924aae6fd33a3e823b67fd1b1ea011099328f9
clean up zero-byte logfile on immediate exit

Otherwise, a zero-byte log file stays behind after every call to `i3
--get-socketpath`. Also, replace "return" calls with more explicit "exit"
calls.

Before:

$ ls -ld /tmp/i3* | wc -l; \
  repeat 10 i3 --get-socketpath >/dev/null; \
  ls -ld /tmp/i3* | wc -l
1
11

Now:

$ ls -ld /tmp/i3* | wc -l; \
  repeat 10 i3 --get-socketpath >/dev/null; \
  ls -ld /tmp/i3* | wc -l
1
1

Signed-off-by: Julius Plenz <julius@plenz.com>
include/log.h
src/log.c
src/main.c