Michael Park created MESOS-4549:
-----------------------------------

             Summary: Consider returning `Try` for `os::system`.
                 Key: MESOS-4549
                 URL: https://issues.apache.org/jira/browse/MESOS-4549
             Project: Mesos
          Issue Type: Task
          Components: stout
            Reporter: Michael Park
            Priority: Minor


The {{os::system}} has the following description:
{code}
// Executes a command by calling "/bin/sh -c <command>", and returns
// after the command has been completed. Returns 0 if succeeds, and
// return -1 on error (e.g., fork/exec/waitpid failed). This function
// is async signal safe. We return int instead of returning a Try
// because Try involves 'new', which is not async signal safe.
inline int system(const std::string& command);
{code}

Since {{Try}} no longer involves dynamic allocations, we can reconsider 
returning a {{Try}} out of this function.



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

Reply via email to