mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guangya Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-4576) Introduce a stout helper for "which"
Date Fri, 15 Apr 2016 00:21:25 GMT

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

Guangya Liu commented on MESOS-4576:
------------------------------------

[~dishjira] Are you still working on this? I need this patch in my patch chain and want to
have this merged soon, do you mind I take over this if you do not have time cycle on this?
Thanks.

> Introduce a stout helper for "which"
> ------------------------------------
>
>                 Key: MESOS-4576
>                 URL: https://issues.apache.org/jira/browse/MESOS-4576
>             Project: Mesos
>          Issue Type: Improvement
>          Components: stout
>            Reporter: Joseph Wu
>            Assignee: Disha Singh
>              Labels: mesosphere
>
> We may want to add a helper to {{stout/os.hpp}} that will natively emulate the functionality
of the Linux utility {{which}}.  i.e.
> {code}
> Option<string> which(const string& command)
> {
>   Option<string> path = os::getenv("PATH");
>   // Loop through path and return the first one which os::exists(...).
>   return None();
> }
> {code}
> This helper may be useful:
> * for test filters in {{src/tests/environment.cpp}}
> * a few tests in {{src/tests/containerizer/port_mapping_tests.cpp}}
> * the {{sha512}} utility in {{src/common/command_utils.cpp}}
> * as runtime checks in the {{LogrotateContainerLogger}}
> * etc.



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

Mime
View raw message