projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92f150d
)
daemon.c: Avoid setlinebuf().
author
Andre Noll
<maan@tuebingen.mpg.de>
Fri, 2 Jan 2015 19:52:52 +0000
(19:52 +0000)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Mon, 12 Jan 2015 22:29:07 +0000
(23:29 +0100)
Using setvbuf() is equivalent, and more portable. See setbuf(3)
for details.
daemon.c
patch
|
blob
|
history
diff --git
a/daemon.c
b/daemon.c
index b0d8fd744c8f7f0d208afd5f96ca03fe336ece16..8dd4d37e4824c8b8579a96cb338bb1ba980d8d4a 100644
(file)
--- a/
daemon.c
+++ b/
daemon.c
@@
-223,7
+223,8
@@
void daemon_open_log_or_die(void)
strerror(errno));
exit(EXIT_FAILURE);
}
- setlinebuf(me->logfile);
+ /* equivalent to setlinebuf(), but portable */
+ setvbuf(me->logfile, NULL, _IOLBF, 0);
}
/**