You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Greg Mann (JIRA)" <ji...@apache.org> on 2015/05/06 05:02:06 UTC

[jira] [Commented] (MESOS-994) Add an Option os::getenv() to stout

    [ https://issues.apache.org/jira/browse/MESOS-994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14529805#comment-14529805 ] 

Greg Mann commented on MESOS-994:
---------------------------------

While working on this, I've discovered that in a couple places (/3rdparty/libprocess/src/process.cpp for example), the stock getenv() is called rather than os::getenv(), and in other cases (/src/examples/low_level_scheduler_libprocess.cpp) they are both called:

{code}
if (getenv("MESOS_BUILD_DIR")) {
  uri = path::join(os::getenv("MESOS_BUILD_DIR"), "src", "test-executor");
}
{code}

What is the rationale for using these two different calls, or should os::getenv() be used exclusively?

> Add an Option<string> os::getenv() to stout
> -------------------------------------------
>
>                 Key: MESOS-994
>                 URL: https://issues.apache.org/jira/browse/MESOS-994
>             Project: Mesos
>          Issue Type: Improvement
>          Components: stout, technical debt
>            Reporter: Ian Downes
>            Assignee: Greg Mann
>              Labels: newbie
>
> This would replace the common pattern of:
> Option<string> = os::hasenv() ? Option<string>(os::getenv()) : None()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)