From a14bade6c6c17df9c0877c30e4903a1e2d8175fd Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Sun, 27 Dec 2020 00:53:20 +0100 Subject: proc: send signals with POSIX sigcodes * proc/stubs.c (send_signal): Add a sigcode argument. * proc/proc.h (send_signal): Declare the sigcode argument. * proc/pgrp.c (leave_pgrp): Specify a null sigcode. * proc/wait.c (alert_parent): Use CLD_EXITED for SIGCHLD on exit. (S_proc_mark_stop): Use CLD_STOPPED for SIGCHLD on stop. --- proc/wait.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proc/wait.c') diff --git a/proc/wait.c b/proc/wait.c index e8c379a0..8883d458 100644 --- a/proc/wait.c +++ b/proc/wait.c @@ -145,7 +145,7 @@ alert_parent (struct proc *p) /* We accumulate the aggregate usage stats of all our dead children. */ rusage_add (&p->p_parent->p_child_rusage, &p->p_rusage); - send_signal (p->p_parent->p_msgport, SIGCHLD, p->p_parent->p_task); + send_signal (p->p_parent->p_msgport, SIGCHLD, CLD_EXITED, p->p_parent->p_task); if (!p->p_exiting) { @@ -258,7 +258,7 @@ S_proc_mark_stop (struct proc *p, } if (!p->p_parent->p_nostopcld) - send_signal (p->p_parent->p_msgport, SIGCHLD, p->p_parent->p_task); + send_signal (p->p_parent->p_msgport, SIGCHLD, CLD_STOPPED, p->p_parent->p_task); return 0; } -- cgit v1.2.3