1 Commits
Author SHA1 Message Date
sneak add39a24c1 Signals end every command, not only ssh to and ssh install (closes #48)
check / check (push) Failing after 2s
SIGINT, SIGTERM and SIGHUP were caught for the whole run, so the
mnemonic prompt waited for Enter and an interrupted `age encrypt -o`
put the encryption of the cut-off input in place. Now they end the
tool at once, except where a command cleans up first: `ssh to` and
`ssh install` while ssh or sftp runs, and `age encrypt -o` and
`age decrypt -o` while they write. A signal those two have received
when their input ends removes the unfinished file and exits 1; a later
one leaves the whole file in place. The tool stays on the main thread,
where Linux delivers the signal first. Signals the tool was started
ignoring stay ignored, so a run under nohup survives a hangup.

Model: opus-5-5
2026-10-04 11:12:13 +00:00
+2 -2
View File
@@ -18,8 +18,8 @@ import (
"sneak.berlin/go/keyfunc/internal/derive"
)
// ErrInterrupted is returned when SIGINT, SIGTERM or SIGHUP came before
// the file --output names was put in place.
// ErrInterrupted is returned when SIGINT, SIGTERM or SIGHUP has been
// received by the time the work writing the file --output names ends.
var ErrInterrupted = errors.New(
"interrupted by a signal; the output file was left as it was",
)