You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Jie Yu (JIRA)" <ji...@apache.org> on 2014/06/16 23:28:01 UTC

[jira] [Created] (MESOS-1487) Improve Subprocess to support non-pipe mode

Jie Yu created MESOS-1487:
-----------------------------

             Summary: Improve Subprocess to support non-pipe mode
                 Key: MESOS-1487
                 URL: https://issues.apache.org/jira/browse/MESOS-1487
             Project: Mesos
          Issue Type: Bug
            Reporter: Jie Yu


Currently, we always create a pipe when using subprocess. This is not desired in some cases. In some situation, we may just want the subprocess to inherit the file handles from the parent (or redirect to a file).

We can mimic the Python subprocess interface to support those modes. The user can specify: PIPE, a existing file descriptor, or None for stdin/stdout/stderr.

Try<Subprocess> subprocess(
    const std::string& command,
    const Option<int>& stdin = Subprocess::PIPE,
    const Option<int>& stdout = Subprocess::PIPE,
    const Option<int>& stderr = Subprocess::PIPE,
    const Option<std::map<std::string, std::string> >& environment = None(),
    const Option<lambda::function<int()> >& setup = None());




--
This message was sent by Atlassian JIRA
(v6.2#6252)