Fork of bash does not trigger SIGINT for child processes
Opened this issue · 1 comments
Explanation
When you fork bash and then run a command such as cat
or python
, both of which wait for user input, the child process can not be stopped with ctrl+c
. The escape character \x03
is sent properly because you can see it as input in the terminal. However, the commands do not receive a SIGINT signal and therefore do not terminate. Multiple people who use my package on OS X and Linux report this as an issue. I too can confirm that it occurs on OS X.
Steps to Reproduce
- Fork an instance of
bash
- Use
term.js
or something to runcat
,python
or a compiled C file in yourbash
instance - Try using
ctrl+c
to exit
Possibly Useful Information
For some reason this does not affect zsh
on my computer. So forking zsh
instead of bash
solves the issue but is not ideal. Additionally, if I fork zsh
and then inside of zsh
start a bash shell with bash
or exec bash
then bash works just fine.
I've tried exploring the C++ code for pty.js for a fix but I wasn't able to find one. Any help would be appreciated.
This seems to still be a problem.
@jeremyramin I see you have a workaround in your fork, will you be making a PR?