kovidgoyal/kitty · warning

killed by signal: %s

Error message

killed by signal: %s

What it means

get_save_path runs a line-editing prompt (lp) to ask the user for a save path; if the underlying process was terminated by a signal (DeathSignalName non-empty), this error reports the signal name. It means the prompt was killed rather than exiting normally.

Source

Thrown at kittens/remote_file/main.go:211

		if event.Handled {
			rl.Redraw()
		}
		return nil
	}
	lp.OnText = func(text string, from_key_event, in_bracketed_paste bool) error {
		terr := rl.OnText(text, from_key_event, in_bracketed_paste)
		if terr == nil {
			rl.Redraw()
		}
		return terr
	}
	err = lp.Run()
	rl.Shutdown()
	if err != nil {
		return "", false, err
	}
	if ds := lp.DeathSignalName(); ds != "" {
		return "", false, fmt.Errorf("killed by signal: %s", ds)
	}
	return result, aborted, nil
}

func master_show_error(m *ControlMaster, msg string) {
	if m.LastErrorLog != "" {
		fmt.Fprintln(os.Stderr, m.LastErrorLog)
		m.LastErrorLog = ""
	}
	show_error(msg)
}

// save_as mirrors main.py:save_as. hostname is the CLI --hostname value used
// by check_hostname_matches.
func save_as(conn *SSHConnectionData, remote_path, hostname string) error {
	ddir := utils.CacheDir()
	if err := os.MkdirAll(ddir, 0o755); err != nil {
		return err

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Re-run the save_as operation; treat as user abort if interrupted deliberately
  2. Avoid closing/hanging up the terminal while the prompt is open
  3. Check DeathSignalName to distinguish user Ctrl-C from external kills and handle aborts gracefully
Defensive patterns

Strategy: try-catch

Try / catch

_, _, err := get_save_path(...)
if err != nil && strings.HasPrefix(err.Error(), "killed by signal") {
    // treat as user abort, exit cleanly
}

Prevention

When it happens

Trigger: Running save_as in the remote_file kitten while the prompt process receives SIGTERM/SIGINT/SIGHUP (terminal closed, user killed it).

Common situations: Closing the kitty window during the prompt, terminal resize/hangup, or a process manager sending signals.

Related errors


AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27). Data as JSON: /api/errors/786f92fb03ad7951. Report an issue: GitHub.