mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
Kernel: Move signal handlers from being thread state to process state
POSIX requires that sigaction() and friends set a _process-wide_ signal handler, so move signal handlers and flags inside Process. This also fixes a "pid/tid confusion" FIXME, as we can now send the signal to the process and let that decide which thread should get the signal (which is the thread with tid==pid, but that's now the Process's problem). Note that each thread still retains its signal mask, as that is local to each thread.
This commit is contained in:
parent
18b9d02edd
commit
cf63447044
5 changed files with 19 additions and 19 deletions
|
@ -827,6 +827,12 @@ private:
|
|||
NonnullRefPtrVector<Thread> m_threads_for_coredump;
|
||||
|
||||
mutable RefPtr<ProcessProcFSTraits> m_procfs_traits;
|
||||
struct SignalActionData {
|
||||
VirtualAddress handler_or_sigaction;
|
||||
int flags { 0 };
|
||||
u32 mask { 0 };
|
||||
};
|
||||
Array<SignalActionData, NSIG> m_signal_action_data;
|
||||
|
||||
static_assert(sizeof(ProtectedValues) < (PAGE_SIZE));
|
||||
alignas(4096) ProtectedValues m_protected_values;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue