1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Send SIGCHLD to init even for reparented processes.

This commit is contained in:
Jonas 'Sortie' Termansen 2021-12-12 00:05:48 +01:00
parent db4ab331c7
commit 20648e03d7

View file

@ -490,11 +490,9 @@ void Process::NotifyChildExit(Process* child, bool zombify)
// become a zombie process. Additionally, always notify init about children // become a zombie process. Additionally, always notify init about children
// when init is exiting, because OnLastThreadExit needs to be able to catch // when init is exiting, because OnLastThreadExit needs to be able to catch
// every child exiting. // every child exiting.
DeliverSignal(SIGCHLD);
if ( zombify || (is_init_exiting && Scheduler::GetInitProcess() == this) ) if ( zombify || (is_init_exiting && Scheduler::GetInitProcess() == this) )
{
DeliverSignal(SIGCHLD);
kthread_cond_broadcast(&zombiecond); kthread_cond_broadcast(&zombiecond);
}
} }
pid_t Process::Wait(pid_t thepid, int* status_ptr, int options) pid_t Process::Wait(pid_t thepid, int* status_ptr, int options)