projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: race between lttng-ust getenv() and application setenv()
[lttng-ust.git]
/
liblttng-ust
/
lttng-ust-comm.c
diff --git
a/liblttng-ust/lttng-ust-comm.c
b/liblttng-ust/lttng-ust-comm.c
index 38e66dc25926d64407d6fb48013849fc331c1198..61d5d2d87ad14df1cbd96fe813c6b782d680f9fe 100644
(file)
--- a/
liblttng-ust/lttng-ust-comm.c
+++ b/
liblttng-ust/lttng-ust-comm.c
@@
-356,11
+356,11
@@
const char *get_lttng_home_dir(void)
{
const char *val;
{
const char *val;
- val = (const char *) lttng_
secure_
getenv("LTTNG_HOME");
+ val = (const char *) lttng_getenv("LTTNG_HOME");
if (val != NULL) {
return val;
}
if (val != NULL) {
return val;
}
- return (const char *) lttng_
secure_
getenv("HOME");
+ return (const char *) lttng_getenv("HOME");
}
/*
}
/*
@@
-460,7
+460,7
@@
long get_timeout(void)
long constructor_delay_ms = LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS;
if (!got_timeout_env) {
long constructor_delay_ms = LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS;
if (!got_timeout_env) {
- str_timeout = getenv("LTTNG_UST_REGISTER_TIMEOUT");
+ str_timeout =
lttng_
getenv("LTTNG_UST_REGISTER_TIMEOUT");
got_timeout_env = 1;
}
if (str_timeout)
got_timeout_env = 1;
}
if (str_timeout)
@@
-1597,6
+1597,7
@@
void __attribute__((constructor)) lttng_ust_init(void)
* sessiond before the init functions are completed).
*/
init_usterr();
* sessiond before the init functions are completed).
*/
init_usterr();
+ lttng_ust_getenv_init(); /* Needs init_usterr() to be completed. */
init_tracepoint();
lttng_ust_clock_init();
lttng_ust_getcpu_init();
init_tracepoint();
lttng_ust_clock_init();
lttng_ust_getcpu_init();
This page took
0.024659 seconds
and
4
git commands to generate.