mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
Shell: Make interrupts kill the whole chain and not just the current job
This makes interrupting `sleep 10; echo hi` not print `hi` anymore, which is the expected behaviour anyway. Also fixes the problem with fast-running loops "eating" interrupts and not quitting.
This commit is contained in:
parent
abaee3a325
commit
ea66750640
3 changed files with 33 additions and 13 deletions
|
@ -228,6 +228,8 @@ public:
|
|||
None,
|
||||
InternalControlFlowBreak,
|
||||
InternalControlFlowContinue,
|
||||
InternalControlFlowInterrupted,
|
||||
InternalControlFlowKilled,
|
||||
EvaluatedSyntaxError,
|
||||
NonExhaustiveMatchRules,
|
||||
InvalidGlobError,
|
||||
|
@ -260,6 +262,8 @@ public:
|
|||
switch (error) {
|
||||
case ShellError::InternalControlFlowBreak:
|
||||
case ShellError::InternalControlFlowContinue:
|
||||
case ShellError::InternalControlFlowInterrupted:
|
||||
case ShellError::InternalControlFlowKilled:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue