Error: cannot set terminal process group (-1): Inappropriate ioctl for device
See original GitHub issueWhen I have dumb-init
in ENTRYPOINT
like this
...
ENTRYPOINT ["/usr/bin/dumb-init"]
...
and then try to run bash
with tty
and interactively, I get this error:
docker run --rm -t -i dumb_init_image bash
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
...
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:15 (7 by maintainers)
Top Results From Across the Web
cannot set terminal process group (-1): Inappropriate ioctl for ...
bash_profile" means run - -c "source ~/.bash_profile" as the user lfs non-interactively. Now the shell sees the option - and says, I am...
Read more >What does the sh:cannot set terminal process group
I seems that prompting a shell from this init script won't give access to a device like tty0 , but will only let...
Read more >"bash: cannot set terminal process group (-1): Inappropriate ...
"bash: cannot set terminal process group (-1): Inappropriate ioctl for device" when open Visual Studio Code integrated terminal #315.
Read more >519237 – -bash: cannot set terminal process group (-1)
Bug 519237 - -bash: cannot set terminal process group (-1): Inappropriate ioctl for device. Summary: -bash: cannot set terminal process ...
Read more >bash: cannot set terminal process group (-1) - Ask Ubuntu
Just received this error >> bash: cannot set terminal process group (-1): Inappropriate ioctl for device. then the disk partition went into ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unfortunately I still see this error message, using dumb-init 1.2.0 (Ubuntu 16.04, both directly in the host shell, and inside a
docker run --rm -ti ubuntu:16.04 bash
):Note that
tini
does not exhibit this problem (i.e. works fine with and without its-g
flag).@alhafoudh still looking into the root cause. I think it’s something we can fix.
For now a workaround is to run in non-setsid mode using
-c
, e.g.The only difference behavior-wise is that signals are only forwarded to your direct child. So if you have a process tree like
when you send
docker signal
, the signal is only delivered to PID 2 and not everything in the process group (potentially including the workers).This is usually acceptable behavior since the server is supposed to handle signaling its workers before it dies anyway. Unfortunately there are some exceptions, which is why the default is setsid mode.
I’ll keep looking into this and get back to you.