mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jie Yu (JIRA)" <>
Subject [jira] [Created] (MESOS-8978) Command executor calling setsid breaks the tty support.
Date Tue, 05 Jun 2018 19:38:00 GMT
Jie Yu created MESOS-8978:

             Summary: Command executor calling setsid breaks the tty support.
                 Key: MESOS-8978
             Project: Mesos
          Issue Type: Bug
    Affects Versions: 1.6.0, 1.5.1, 1.4.1
            Reporter: Jie Yu

I was playing with [msh|]
(one example from [mesos-go|]), which allows you to launch
a interactive shell in the Mesos cluster. It works by launch a container with tty enabled,
and then [attach to the container input|]
using the agent operator API.

However, I got the following error when doing the following:
Jies-MacBook-Pro:mesos-go jie$  ./msh -master -tty -interactive -- /bin/sh
2018/06/05 11:51:35 original window size is 156 x 45
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell

If I use `-pod`, the problem goes away. This only happens if command executor is used.

A few research suggested that this issue is related to `setsid` (see this [thread|]).
Looks like we did an extra `[setsid|]`
in the command executor.

The setsid() system call to create a new process group detaches the spawned process from a
controlling tty. Therefore programs like bash complain, that they can't use job control. Re-attaching
the controlling tty won't work, because the tty is still in use as a controlling tty for the
command executor process.

This message was sent by Atlassian JIRA

View raw message