I was playing with msh (one example from mesos-go), which allows you to launch an interactive shell in the Mesos cluster. It works by launching 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:
If I use `-pod`, the problem goes away. This only happens if command executor is used.
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.
There are two possible solutions:
1) Get rid of setsid in command executor
2) Detach and re-attach the controlling TTY as suggested in https://github.com/Yelp/dumb-init/issues/51#issuecomment-227792216