You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2015/06/09 03:24:00 UTC

[jira] [Commented] (MESOS-2810) mesos-executor reimplements subprocess

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

Benjamin Mahler commented on MESOS-2810:
----------------------------------------

For posterity, myself, [~vinodkone], [~idownes] and [~jieyu] also happened to be looking at this sometime before this ticket was filed. We should be able to replace it, since this code came before Subprocess.

We were trying to figure out the reason for the {{setsid}} [loop|https://github.com/apache/mesos/blob/9e7b890a917fcf0ac4cd1738f060ba97af847b65/src/launcher/executor.cpp#L209], since it is a key difference in the implementation. This is really old code from the svn days, the thread is [here|http://marc.info/?l=mesos-dev&m=142539941428719&w=2] but doesn't reveal any additional explanation. As far as we can tell from the POSIX [fork spec|http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html] the {{setsid}} loop should not be necessary:

{quote}
The child process ID also shall not match any active process group ID.
{quote}

However, [setsid|http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsid.html] seems to be a bit more ambiguous about it:
{quote}
EPERM
  The calling process is already a process group leader, or the process group ID of a process other than the calling process matches the process ID of the calling process.
{quote}

> mesos-executor reimplements subprocess
> --------------------------------------
>
>                 Key: MESOS-2810
>                 URL: https://issues.apache.org/jira/browse/MESOS-2810
>             Project: Mesos
>          Issue Type: Improvement
>          Components: slave
>            Reporter: Cody Maloney
>              Labels: mesosphere, newbie, tech-debt
>
> The launchTask method is a re-implementation of libprocess subprocess
> https://github.com/apache/mesos/blob/master/src/launcher/executor.cpp#L110



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