You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2018/06/05 21:34:10 UTC

setsid(2) dependency

Hi,

Currently, if you're using Mesos container (aka UCR), we put each container
into a separate process session
<https://github.com/apache/mesos/blob/1.6.x/src/slave/containerizer/mesos/linux_launcher.cpp#L571>
(i.e., calling setsid(2) <https://linux.die.net/man/2/setsid> after fork
the initial process).

For command tasks, we actually do that twice:
1) For the command executor itself
2) When launching the task
<https://github.com/apache/mesos/blob/1.6.x/src/launcher/executor.cpp#L512>
in the command executor.

Because of that, we hit one issue that's related to setsid(2) and tty.
Please see more details about the problem in this ticket MESOS-8978
<https://issues.apache.org/jira/browse/MESOS-8978>.

Anyone remember why we do setsid(2) for each container? Anyone rely on this
behavior?

I am asking because one simple way to solve this issue is to remove SETSID
child hook when launching the task in the command executor.

Thanks!
- Jie