containers / containers/bubblewrap
ctrl+c sends SIGINT to bubblwrap instead of child process
- Dominant language
- C
- Stars
- 8.7k
- Forks
- 386
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 11
Description
Here is a dumb python program where the issue happens:
```
import signal
import asyncio
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
def interrupt():
s = input("test")
print(s)
loop.stop()
loop.add_signal_handler(signal.SIGINT, interrupt)
loop.run_forever()
loop.remove_signal_handler(signal.SIGINT)
loop.close()
```
On host, running this program, then pressing ctrl+c, a prompt shows up, then I can type some text and enter. The text is printed again and the program exits.
Now, if I run through `bwrap --ro-bind / / -- /usr/bin/python3 test.py`, I get the error:
```
handle:
Traceback (most recent call last):
File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "test-interrupt.py", line 8, in interrupt
s = input("test")
EOFError
```
This is because is bwrap is part of foreground process group. Instead it should be the child process as to be the foreground process group.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.