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
One Ctrl-C does not stop a line of joined bounded commands #69
One Ctrl-C does not stop a line of joined wrapper calls. bounding-heavy-commands (#56) asks the user to run one line that joins a wrapper call per command with ;. When the user presses Ctrl-C, the wrapper that runs at that moment catches the signal, cleans up, and exits normally with code 130. The shell then sees an ordinary exit, not a death by signal, and starts the next wrapper call. The user has to press Ctrl-C one time for each command in the line.
Approach
After its cleanup, a wrapper that was stopped by SIGINT (or by another stop signal that it forwards) restores the default handler and sends the same signal to itself, so it dies from the signal. A shell then stops a joined line, as it does for any command that SIGINT ends. The exit code seen by a caller that reads $? stays 130.
Acceptance criteria
A process test: a line wrapper -- <long command>; touch <file> run under sh -c and sent SIGINT does not create the file.
The exit status of the wrapper after SIGINT is still 130 for a caller.
A stop while the wrapper waits in the queue behaves the same way.
Activity
fix(skills/bounding-heavy-commands): stop a joined line on one Ctrl-C
fix(skills/bounding-heavy-commands): stop a joined line on one Ctrl-C
fix(skills/bounding-heavy-commands): stop a joined line on one Ctrl-C
fix(skills/bounding-heavy-commands): stop a joined line on one Ctrl-C