1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

Kernel: Expose the signal that stopped a thread via sys$waitpid()

This commit is contained in:
Andreas Kling 2020-01-27 20:47:10 +01:00
parent 638fe6f84a
commit 5163c5cc63
3 changed files with 11 additions and 2 deletions

View file

@ -471,6 +471,7 @@ ShouldUnblockThread Thread::dispatch_signal(u8 signal)
m_pending_signals &= ~(1 << (signal - 1));
if (signal == SIGSTOP) {
m_stop_signal = SIGSTOP;
set_state(Stopped);
return ShouldUnblockThread::No;
}
@ -482,6 +483,7 @@ ShouldUnblockThread Thread::dispatch_signal(u8 signal)
if (handler_vaddr.is_null()) {
switch (default_signal_action(signal)) {
case DefaultSignalAction::Stop:
m_stop_signal = signal;
set_state(Stopped);
return ShouldUnblockThread::No;
case DefaultSignalAction::DumpCore: