Commit 2c9bd007 by Daniel Lezcano Committed by Daniel Lezcano

make the log fd thread safe

Add the tls attribute for the global static variables in the logs. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent dcb7355b
...@@ -16,9 +16,8 @@ ...@@ -16,9 +16,8 @@
#define LXC_LOG_PREFIX_SIZE 32 #define LXC_LOG_PREFIX_SIZE 32
#define LXC_LOG_BUFFER_SIZE 512 #define LXC_LOG_BUFFER_SIZE 512
int lxc_log_fd = 2; static __thread int lxc_log_fd = 2;
static __thread char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc";
static char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc";
lxc_log_define(lxc_log, lxc); lxc_log_define(lxc_log, lxc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment