mirror of
https://github.com/tmux/tmux.git
synced 2025-04-01 21:41:44 +00:00
Merge branch 'obsd-master' into master
This commit is contained in:
commit
8f5ff4bf66
11
log.c
11
log.c
@ -110,14 +110,15 @@ log_vwrite(const char *msg, va_list ap)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (vasprintf(&fmt, msg, ap) == -1)
|
if (vasprintf(&fmt, msg, ap) == -1)
|
||||||
exit(1);
|
return;
|
||||||
if (stravis(&out, fmt, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL) == -1)
|
if (stravis(&out, fmt, VIS_OCTAL|VIS_CSTYLE|VIS_TAB|VIS_NL) == -1) {
|
||||||
exit(1);
|
free(fmt);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
if (fprintf(log_file, "%lld.%06d %s\n", (long long)tv.tv_sec,
|
if (fprintf(log_file, "%lld.%06d %s\n", (long long)tv.tv_sec,
|
||||||
(int)tv.tv_usec, out) == -1)
|
(int)tv.tv_usec, out) != -1)
|
||||||
exit(1);
|
|
||||||
fflush(log_file);
|
fflush(log_file);
|
||||||
|
|
||||||
free(out);
|
free(out);
|
||||||
|
Loading…
Reference in New Issue
Block a user