mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
Kernel: Move process parent PID into protected data :^)
This commit is contained in:
parent
d677a73b0e
commit
3d27269f13
4 changed files with 6 additions and 6 deletions
|
@ -238,7 +238,6 @@ Process::Process(RefPtr<Thread>& first_thread, const String& name, uid_t uid, gi
|
|||
, m_executable(move(executable))
|
||||
, m_cwd(move(cwd))
|
||||
, m_tty(tty)
|
||||
, m_ppid(ppid)
|
||||
, m_wait_block_condition(*this)
|
||||
{
|
||||
m_protected_data = KBuffer::try_create_with_size(sizeof(ProtectedData));
|
||||
|
@ -247,6 +246,7 @@ Process::Process(RefPtr<Thread>& first_thread, const String& name, uid_t uid, gi
|
|||
{
|
||||
MutableProtectedData protected_data { *this };
|
||||
protected_data->pid = allocate_pid();
|
||||
protected_data->ppid = ppid;
|
||||
protected_data->uid = uid;
|
||||
protected_data->gid = gid;
|
||||
protected_data->euid = uid;
|
||||
|
@ -518,7 +518,7 @@ void Process::finalize()
|
|||
|
||||
{
|
||||
// FIXME: PID/TID BUG
|
||||
if (auto parent_thread = Thread::from_tid(m_ppid.value())) {
|
||||
if (auto parent_thread = Thread::from_tid(ppid().value())) {
|
||||
if (!(parent_thread->m_signal_action_data[SIGCHLD].flags & SA_NOCLDWAIT))
|
||||
parent_thread->send_signal(SIGCHLD, this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue