[
https://issues.apache.org/jira/browse/MESOS-5070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15219695#comment-15219695
]
Joerg Schad commented on MESOS-5070:
------------------------------------
We propose the subprocess interface to change as shown below, which means to
add a vector of so called ChildHooks and remove the setsid can chdir options.
{code}
Try<Subprocess> subprocess(
const std::string& path,
std::vector<std::string> argv,
const Subprocess::IO& in,
const Subprocess::IO& out,
const Subprocess::IO& err,
const Option<flags::FlagsBase>& flags,
const Option<std::map<std::string, std::string>>& environment,
const std::vector<Subprocess::Hook>& parent_hooks,
const std::vector<Subprocess::ChildHook>& child_hooks,
const Watchdog watchdog)
{code}
A ChildHook represents a predefined functions to be executed in the child
process before exec.
In order to prevent arbitrary code, a ChildHook needs to be constructed via
explicit factory methods.
> 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
>
> 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)