For complete putenv()-like behaviour.
Further investigation on why putenv() caused EFAULTs on execve() and
segfaults on reload:
putenv(3):
"The string pointed to by string becomes part of the environment,
so altering the string changes the environment."
setenv(3):
"This function makes copies of the strings pointed to by name and value
(by contrast with putenv(3))."
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
if (zstr(path)) {
if (switch_directory_exists("/usr/lib64/ladspa/", pool) == SWITCH_STATUS_SUCCESS) {
- setenv("LADSPA_PATH", "/usr/lib64/ladspa/:/usr/local/lib/ladspa", 0);
+ setenv("LADSPA_PATH", "/usr/lib64/ladspa/:/usr/local/lib/ladspa", 1);
} else if (switch_directory_exists("/usr/lib/ladspa/", pool) == SWITCH_STATUS_SUCCESS) {
- setenv("LADSPA_PATH", "/usr/lib/ladspa/:/usr/local/lib/ladspa", 0);
+ setenv("LADSPA_PATH", "/usr/lib/ladspa/:/usr/local/lib/ladspa", 1);
}
}