mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Rukletsov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-5070) Introduce more flexible subprocess interface for child options.
Date Wed, 24 Aug 2016 15:05:21 GMT

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

Alexander Rukletsov commented on MESOS-5070:
--------------------------------------------

[~jieyu], [~js84], what are use cases for this change? We needed something similar with [~haosdent@gmail.com]
recently and came up with the custom clone solution. It looks something like
{code}
// Call `setns` between `clone` and `exec`.
pid_t myClone(
    const lambda::function<int()>& func,
    pid_t taskPid,
    const vector<string>& namespaces)
{
  pid_t pid = os::clone([=]() -> int {
    foreach (const string& ns, namespaces) {
      Try<Nothing> setns = ns::setns(taskPid, namespace);
    }

    return func();
  }, SIGCHLD);

  return pid;
}
{code}

> Introduce more flexible subprocess interface for child options.
> ---------------------------------------------------------------
>
>                 Key: MESOS-5070
>                 URL: https://issues.apache.org/jira/browse/MESOS-5070
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Joerg Schad
>            Assignee: Joerg Schad
>              Labels: tech-debt
>
> We introduced a number of parameters to the subprocess interface with MESOS-5049.
> Adding all options explicitly to the subprocess interface makes it inflexible. 
> We should investigate a flexible options, which still prevents arbitrary code to be executed.



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

Mime
View raw message