lib.ec.ssh.AsyncSSH: Forward SIGINT to remote
The first Ctrl-C cancels the running task while the SSH connection is still open, but _run_ssh() has no cleanup: the connection is abandoned and the remote process is never signalled. A long-running command such as zypper dup therefore keeps running after the client dies, taking its children with it and leaving the system in a half-baked state, e.g. a mid-air package transaction. Catch the cancellation inside the run, forward SIGINT to the remote process, and wait for it to exit, draining the captured output, before propagating the cancellation. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.2 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
b47163582d
commit
dd67dbf544
1 changed files with 18 additions and 2 deletions
|
|
@ -5,8 +5,8 @@ from jw.pkg.lib.ec.secret_store.layout import (
|
|||
FT_SECRET_FILE,
|
||||
FT_SECRET_KEY,
|
||||
SECRET_SUFFIX,
|
||||
target_name,
|
||||
host_prefix,
|
||||
target_name,
|
||||
)
|
||||
from jw.pkg.lib.file_types import FT_COMPOUND, FT_DIR, FT_REG
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue