-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctrl + c not functional #21
Comments
ok so this is where the signals are handled in the backend. ioBroker.terminal/lib/web-terminal/lib/terminal.js Lines 276 to 296 in 18b25fb
and this is where the signals are emitted from the frontend to the backend. ioBroker.terminal/lib/web-terminal/web/init.js Lines 373 to 389 in 18b25fb
67 is indeed ctrl + c and 68 is ctrl + d. |
ok so apparently replacing
with socket.emit("console", `killing ${proc.pid} with signal ${signal} ${proc.kill(signal) ? "succeeded" : "failed"}`); does indicate that the kill succeeds.
I assume sigint just does not propagate through
the SIGINT will be sent to pid 2809.
Executing The problem boils down to using /bin/sh, which will not forward signals to child processes. Related issues with workarounds: From my experience, the problem boils down to using This Terminal Plugin should probably just abandon this legacy terminal thing and move over to something like https://github.com/microsoft/node-pty with https://github.com/xtermjs/xterm.js as frontend (vscode uses it) I technically could fix the problems by just removing want me to try refactoring this? https://github.com/tsl0922/ttyd |
Hi, thank you very much for all these investigations! We already have an xterm adapter you might want to try out which should base exactly on that ... SO for terminal I would also be happy for a PR for a fix, but would not refacter too much. because maybe xterm is a better way for the future |
xterm is in beta repo ... on a list to bring to stable tho. You can install from beta (Admin - enable expert mode - custom install button - install from npm) |
@GottZ So after reading all the input I think the "Only" solution that makes sense to me would be to use https://github.com/simonepri/pidtree with proc.pid and then kill all that came back there. WHat do you think? |
Oh that's dirty! I like it. |
Do you want to test it :-) GitHub is updated ... please restart adapter once after update |
nice. it works flawless on linux. |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
termination of ping execution
Screenshots & Logfiles
(killed through a different shell using htop)
Versions:
Additional context
It is impossible to type in new commands while the ping is running.
The text was updated successfully, but these errors were encountered: