[
https://issues.apache.org/jira/browse/MESOS-6751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15867996#comment-15867996
]
Till Toenshoff commented on MESOS-6751:
---------------------------------------
Seems the problems also exists for the fetcher.... preparing a fix for that.
> Mesos should allow for selective environment inheritance.
> ---------------------------------------------------------
>
> Key: MESOS-6751
> URL: https://issues.apache.org/jira/browse/MESOS-6751
> Project: Mesos
> Issue Type: Improvement
> Reporter: Till Toenshoff
>
> We have often run into issues with environment variables inherited by
> subprocesses which in certain setups cause problems.
> VERY recent examples are:
> - MESOS-6747
> - MESOS-6748
> The pattern for solving an inheritance that covers bases like PATH,
> LD_LIBRARY_PATH and DYLD_LIBRARY_PATH but at the same time carves out traps
> like LIBPROCESS_-related variables and maybe also MESOS_-related variables is
> relatively simple.
> {noformat}
> map<string, string> environment;
> foreachpair (const string& key, const string& value, os::environment()) {
> if (!strings::startsWith(key, "LIBPROCESS_") &&
> !strings::startsWith(key, "MESOS_")) {
> environment.emplace(key, value);
> }
> }
> {noformat}
> But maybe we can somehow force the use of such pattern to make this kind of
> bug less frequent on new code that forks.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)