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 651d2aaa45cec437cabb7cdb4147d66330800065..43728ff47613d2d2fb0b8e092268ea1c60243f79 100644
(file)
--- a/
liblttng-ust/lttng-ust-comm.c
+++ b/
liblttng-ust/lttng-ust-comm.c
@@
-366,11
+366,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");
}
/*
}
/*
@@
-471,7
+471,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)
@@
-538,7
+538,7
@@
static
void get_blocking_retry_timeout(void)
{
const char *str_blocking_retry_timeout =
void get_blocking_retry_timeout(void)
{
const char *str_blocking_retry_timeout =
- lttng_
secure_
getenv("LTTNG_UST_BLOCKING_RETRY_TIMEOUT");
+ lttng_getenv("LTTNG_UST_BLOCKING_RETRY_TIMEOUT");
if (str_blocking_retry_timeout) {
long timeout = strtol(str_blocking_retry_timeout, NULL, 10);
if (str_blocking_retry_timeout) {
long timeout = strtol(str_blocking_retry_timeout, NULL, 10);
@@
-1679,6
+1679,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_init_fd_tracker();
lttng_ust_clock_init();
init_tracepoint();
lttng_ust_init_fd_tracker();
lttng_ust_clock_init();
This page took
0.023623 seconds
and
4
git commands to generate.