Found by the fourth review of #54 (#54 (comment)); next already behaves this way, so it is split out of that PR.
A SIGINT, SIGTERM or SIGHUP sent to the tool alone (for example kill <pid>) while keyfunc ssh install is reaching a host that does not answer does not end the tool: it keeps running until the connection attempt gives up. The signal kills sftp outright, the ssh that sftp started stays alive holding the output the tool reads sftp through, and the tool waits for that output to close.
Work, on a branch cut from next after #54 has landed (it moves the signal handling into internal/cli/signals), PR to next: end sftp with SIGTERM, as connect already does for ssh, so that sftp stops its own ssh, and give the command a WaitDelay so a child still holding the output cannot keep the tool waiting. The test's sftp stand-in leaves a child holding its output (no exec), so the test covers this case.
Definition of done
Such a signal ends ssh install within a second, with status 1 and its working directory removed, even when something sftp started is still running.
make check passes.
Model: opus-5-5
Found by the fourth review of https://git.eeqj.de/sneak/keyfunc/pulls/54 (https://git.eeqj.de/sneak/keyfunc/pulls/54#issuecomment-121965); `next` already behaves this way, so it is split out of that PR.
A SIGINT, SIGTERM or SIGHUP sent to the tool alone (for example `kill <pid>`) while `keyfunc ssh install` is reaching a host that does not answer does not end the tool: it keeps running until the connection attempt gives up. The signal kills `sftp` outright, the `ssh` that `sftp` started stays alive holding the output the tool reads `sftp` through, and the tool waits for that output to close.
Work, on a branch cut from `next` after https://git.eeqj.de/sneak/keyfunc/pulls/54 has landed (it moves the signal handling into `internal/cli/signals`), PR to `next`: end `sftp` with SIGTERM, as `connect` already does for `ssh`, so that `sftp` stops its own `ssh`, and give the command a `WaitDelay` so a child still holding the output cannot keep the tool waiting. The test's `sftp` stand-in leaves a child holding its output (no `exec`), so the test covers this case.
## Definition of done
- Such a signal ends `ssh install` within a second, with status 1 and its working directory removed, even when something `sftp` started is still running.
- `make check` passes.
Model: opus-5-5
clawbot
self-assigned this 2026-10-04 10:26:06 +02:00
#58: a signal now sends sftp a SIGTERM, the sftp command has a quarter-second WaitDelay, and the test stand-in leaves a child holding its output. One judgement call beyond the brief is stated on the PR.
Model: opus-5-5
https://git.eeqj.de/sneak/keyfunc/pulls/58: a signal now sends `sftp` a SIGTERM, the `sftp` command has a quarter-second `WaitDelay`, and the test stand-in leaves a child holding its output. One judgement call beyond the brief is stated on the PR.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by the fourth review of #54 (#54 (comment));
nextalready behaves this way, so it is split out of that PR.A SIGINT, SIGTERM or SIGHUP sent to the tool alone (for example
kill <pid>) whilekeyfunc ssh installis reaching a host that does not answer does not end the tool: it keeps running until the connection attempt gives up. The signal killssftpoutright, thesshthatsftpstarted stays alive holding the output the tool readssftpthrough, and the tool waits for that output to close.Work, on a branch cut from
nextafter #54 has landed (it moves the signal handling intointernal/cli/signals), PR tonext: endsftpwith SIGTERM, asconnectalready does forssh, so thatsftpstops its ownssh, and give the command aWaitDelayso a child still holding the output cannot keep the tool waiting. The test'ssftpstand-in leaves a child holding its output (noexec), so the test covers this case.Definition of done
ssh installwithin a second, with status 1 and its working directory removed, even when somethingsftpstarted is still running.make checkpasses.Model: opus-5-5
#58: a signal now sends
sftpa SIGTERM, thesftpcommand has a quarter-secondWaitDelay, and the test stand-in leaves a child holding its output. One judgement call beyond the brief is stated on the PR.Model: opus-5-5