You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e4baec9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(skills/bounding-heavy-commands): stop a joined line of bounded commands on one Ctrl-C (#71)
* fix(skills/bounding-heavy-commands): stop a joined line on one Ctrl-C
A line of wrapper calls joined with ';' needed one Ctrl-C for each call. The wrapper caught the signal, cleaned up, and exited normally with 130, so the shell ran the next call.
When a stop signal (SIGINT, SIGTERM, SIGHUP, SIGQUIT) reaches the wrapper, while it waits in the queue or while the command runs, the wrapper now finishes its cleanup and its lines, restores the default handler, and sends the signal to itself. The shell sees a death by signal and stops the line. A caller that reads the status still reads 128 plus the signal. A command that exits 130 by itself, with no signal to the wrapper, still gives a normal exit 130. --measure-rows still stops its rows first. The --inside-cap process is unchanged: its parent wrapper got the signal and ends by it.
Fixes#69
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(skills/bounding-heavy-commands): say that a joined line stops on a Ctrl-C, not on a signal to the wrapper alone
The shell stops a line of joined commands when it gets the interrupt too, as with a Ctrl-C at the terminal. A signal sent to the wrapper alone ends the wrapper by that signal, and the shell runs the next command of the line. The usage text and the skill said that each stop signal to the wrapper stops the line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(skills/bounding-heavy-commands): say in exit_as that the shell must get the signal too
The docstring said that a shell stops a joined line when the running command dies from a signal. The shell stops it only when it got the signal as well, as with a Ctrl-C at the terminal; the caller test shows bash going on when only the wrapper is signalled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(skills/bounding-heavy-commands): stop a joined line on Ctrl-C after a failed row
No process test covered the case where a row fails and a later row gets the interrupt. The new test runs --measure-rows in a bash line, lets the first row exit 3, interrupts the second, and checks that the wrapper dies from SIGINT and that the next command of the line does not run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|`--cpus <n>`| Processor limit, as a whole number. Taken from the record. |
45
45
|`--exclusive <name>`| A resource that only one command may hold at a time, such as a fixed port. You choose the name. The wrapper keeps the names of each repository apart, and all worktrees of one repository share them. Repeat the option for each resource. |
46
46
|`--measure`| Also print a suggested budget. Discovery uses it. With no `--memory`, the command runs with the default budget where the hard cap is available, and alone in the queue where it is not. |
47
-
|`--measure-rows <n>,<n>,...`| Measure the command one time at each `--cpus` of the list, one after the other, the largest first. The largest runs with the `--memory` of the call. With no `--memory`, it runs with the default budget where the hard cap is available, and alone in the queue where it is not. Each smaller one runs with `--memory` at the suggested budget of the one before it. When the one before it did not exit 0, the smaller one runs with the same `--memory` as that one. Use it in place of `--cpus` and `--measure`. A stop signal ends the list. The exit code is the first exit code of a row that is not 0. |
47
+
|`--measure-rows <n>,<n>,...`| Measure the command one time at each `--cpus` of the list, one after the other, the largest first. The largest runs with the `--memory` of the call. With no `--memory`, it runs with the default budget where the hard cap is available, and alone in the queue where it is not. Each smaller one runs with `--memory` at the suggested budget of the one before it. When the one before it did not exit 0, the smaller one runs with the same `--memory` as that one. Use it in place of `--cpus` and `--measure`. A stop signal ends the list. A stop signal to the wrapper then ends the wrapper by that signal. So a Ctrl-C, which reaches the shell too, stops a line of joined calls; a signal sent to the wrapper alone does not stop the shell's line. Otherwise the exit code is the first exit code of a row that is not 0. |
48
48
|`--label <name>`| A name for the row lines of a measurement, such as `unit-tests`. Use letters, digits, `.`, `_`, and `-`, and start with a letter or a digit. It changes nothing else. |
49
49
|`--check`| Run no command. Print the state of the queue now, and for each `--memory`, whether a command of that budget would start now. It takes only `--memory`, which you can repeat. It holds no slot, and its exit code is 0. §The record says how to choose a row with it. |
0 commit comments