projects
/
platform
/
upstream
/
nsjail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f2d50b
)
move isatty after log_fd is set
author
Robert Swiecki
<robert@swiecki.net>
Thu, 7 Jun 2018 16:43:08 +0000
(18:43 +0200)
committer
Robert Swiecki
<robert@swiecki.net>
Thu, 7 Jun 2018 16:43:08 +0000
(18:43 +0200)
logs.cc
patch
|
blob
|
history
diff --git
a/logs.cc
b/logs.cc
index
ac9fd32
..
fcb6be7
100644
(file)
--- a/
logs.cc
+++ b/
logs.cc
@@
-48,11
+48,11
@@
static enum llevel_t _log_level = INFO;
static bool _log_set = false;
__attribute__((constructor)) static void log_init(void) {
- _log_fd_isatty = isatty(_log_fd);
_log_fd = fcntl(_log_fd, F_DUPFD_CLOEXEC, 0);
if (_log_fd == -1) {
_log_fd = STDERR_FILENO;
}
+ _log_fd_isatty = isatty(_log_fd);
}
bool logSet() {