{"record":{"id":"786f92fb03ad7951","repo":"kovidgoyal/kitty","slug":"killed-by-signal-s-786f92","errorCode":null,"errorMessage":"killed by signal: %s","messagePattern":"killed by signal: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kittens/remote_file/main.go","lineNumber":211,"sourceCode":"\t\tif event.Handled {\n\t\t\trl.Redraw()\n\t\t}\n\t\treturn nil\n\t}\n\tlp.OnText = func(text string, from_key_event, in_bracketed_paste bool) error {\n\t\tterr := rl.OnText(text, from_key_event, in_bracketed_paste)\n\t\tif terr == nil {\n\t\t\trl.Redraw()\n\t\t}\n\t\treturn terr\n\t}\n\terr = lp.Run()\n\trl.Shutdown()\n\tif err != nil {\n\t\treturn \"\", false, err\n\t}\n\tif ds := lp.DeathSignalName(); ds != \"\" {\n\t\treturn \"\", false, fmt.Errorf(\"killed by signal: %s\", ds)\n\t}\n\treturn result, aborted, nil\n}\n\nfunc master_show_error(m *ControlMaster, msg string) {\n\tif m.LastErrorLog != \"\" {\n\t\tfmt.Fprintln(os.Stderr, m.LastErrorLog)\n\t\tm.LastErrorLog = \"\"\n\t}\n\tshow_error(msg)\n}\n\n// save_as mirrors main.py:save_as. hostname is the CLI --hostname value used\n// by check_hostname_matches.\nfunc save_as(conn *SSHConnectionData, remote_path, hostname string) error {\n\tddir := utils.CacheDir()\n\tif err := os.MkdirAll(ddir, 0o755); err != nil {\n\t\treturn err","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/remote_file/main.go#L193-L229","documentation":"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.","triggerScenarios":"Running save_as in the remote_file kitten while the prompt process receives SIGTERM/SIGINT/SIGHUP (terminal closed, user killed it).","commonSituations":"Closing the kitty window during the prompt, terminal resize/hangup, or a process manager sending signals.","solutions":["Re-run the save_as operation; treat as user abort if interrupted deliberately","Avoid closing/hanging up the terminal while the prompt is open","Check DeathSignalName to distinguish user Ctrl-C from external kills and handle aborts gracefully"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"_, _, err := get_save_path(...)\nif err != nil && strings.HasPrefix(err.Error(), \"killed by signal\") {\n    // treat as user abort, exit cleanly\n}","preventionTips":["Do not close the terminal while prompts are open","Map signal aborts to a clean cancel path"],"tags":["signal","process","prompt","remote-file"],"backgroundTag":"process-killed-by-signal","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}