mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: SIGCONT should unblock a blocked process.
Otherwise we might stay in BlockedSignal state forever. Unblocking just means that the current syscall may fail with EINTR.
This commit is contained in:
parent
d932c03843
commit
67fc42f64e
Notes:
sideshowbarker
2024-07-19 15:33:12 +09:00
Author: https://github.com/awesomekling
Commit: 67fc42f64e
1 changed files with 3 additions and 6 deletions
|
@ -868,11 +868,8 @@ ShouldUnblockProcess Process::dispatch_signal(byte signal)
|
|||
return ShouldUnblockProcess::No;
|
||||
}
|
||||
|
||||
bool did_continue_stopped_process = false;
|
||||
if (signal == SIGCONT && state() == Stopped) {
|
||||
if (signal == SIGCONT && state() == Stopped)
|
||||
set_state(Runnable);
|
||||
did_continue_stopped_process = true;
|
||||
}
|
||||
|
||||
auto handler_laddr = action.handler_or_sigaction;
|
||||
if (handler_laddr.is_null()) {
|
||||
|
@ -880,14 +877,14 @@ ShouldUnblockProcess Process::dispatch_signal(byte signal)
|
|||
case DefaultSignalAction::Stop:
|
||||
set_state(Stopped);
|
||||
return ShouldUnblockProcess::No;
|
||||
case DefaultSignalAction::Continue:
|
||||
return did_continue_stopped_process ? ShouldUnblockProcess::Yes : ShouldUnblockProcess::No;
|
||||
case DefaultSignalAction::DumpCore:
|
||||
case DefaultSignalAction::Terminate:
|
||||
terminate_due_to_signal(signal);
|
||||
return ShouldUnblockProcess::No;
|
||||
case DefaultSignalAction::Ignore:
|
||||
return ShouldUnblockProcess::No;
|
||||
case DefaultSignalAction::Continue:
|
||||
return ShouldUnblockProcess::Yes;
|
||||
}
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue