Skip to content

Commit 975f1fe

Browse files
committed
docs(glossary): Add SIGINT and SIGQUIT terms, link from recipes
why: The interrupt recipe references SIGINT and SIGQUIT without explaining them. Glossary terms with {term} cross-references let readers hover or click for definitions. what: - Add SIGINT and SIGQUIT to docs/glossary.md with send_keys usage - Link 4 occurrences in docs/recipes.md via {term} role
1 parent dd2e7f6 commit 975f1fe

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

docs/glossary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@ Safety tier
3333
3434
Socket
3535
The Unix socket used to communicate with a tmux server. Can be specified by name (`-L`) or path (`-S`).
36+
37+
SIGINT
38+
Interrupt signal (Ctrl-C). Sent via {ref}`send-keys` with `keys: "C-c"` and `enter: false`. Most processes terminate gracefully on SIGINT.
39+
40+
SIGQUIT
41+
Quit signal (Ctrl-\\). Sent via {ref}`send-keys` with `keys: "C-\\"` and `enter: false`. Stronger than {term}`SIGINT` — may produce a core dump on Unix. Use as an escalation when SIGINT is ignored.
3642
```

docs/recipes.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ the target pane.
188188

189189
### Decide
190190

191-
> Did the interrupt work? Some processes ignore SIGINT. I will wait briefly
191+
> Did the interrupt work? Some processes ignore {term}`SIGINT`. I will wait briefly
192192
> for a shell prompt to reappear. Developers use custom prompts, so I cannot
193193
> just look for `$`.
194194
195195
The agent calls {tool}`wait-for-text` with `pattern: "[$#>%] *$"`,
196196
`regex: true`, and `timeout: 5`.
197197

198198
> If the wait resolves, the shell is back. If it times out, the process
199-
> ignored Ctrl-C. I will escalate: try SIGQUIT (`C-\` with `enter: false`),
199+
> ignored Ctrl-C. I will escalate: try {term}`SIGQUIT` (`C-\` with `enter: false`),
200200
> then destroy and replace the pane only as a last resort.
201201
202202
### Act
@@ -214,9 +214,10 @@ submit a partially typed command, or enter a newline into a REPL.
214214

215215
### The non-obvious part
216216

217-
Recovery is a two-step decision. Try the gentle approach first (Ctrl-C),
218-
verify it worked with {toolref}`wait-for-text`, escalate only if needed. The
219-
escalation ladder is: interrupt, verify, escalate signal, destroy. Skipping
217+
Recovery is a two-step decision. Try {term}`SIGINT` first (Ctrl-C),
218+
verify it worked with {toolref}`wait-for-text`, escalate to {term}`SIGQUIT`
219+
only if needed. The escalation ladder is: interrupt, verify, escalate signal,
220+
destroy. Skipping
220221
straight to {toolref}`kill-pane` loses the pane's scrollback history and any
221222
partially written output that might explain *why* it hung.
222223

0 commit comments

Comments
 (0)