mirror of
git://github.com/lxc/lxc
synced 2025-09-01 02:27:17 +00:00
make the log fd thread safe
Add the tls attribute for the global static variables in the logs. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
committed by
Daniel Lezcano
parent
dcb7355b2f
commit
2c9bd0073f
@@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user