Ensure that we send the specified signal to the entire process group of each member of the pid provided to us. This ensures that any children spawned by our children also see the signal
cmr=v1.7.5:reviewer=jsquyres This commit was SVN r31092.
Этот коммит содержится в:
родитель
edf680855e
Коммит
99c9ecaed0
@ -255,9 +255,22 @@ static bool odls_default_child_died(orte_proc_t *child)
|
||||
|
||||
static int odls_default_kill_local(pid_t pid, int signum)
|
||||
{
|
||||
pid_t pgrp;
|
||||
|
||||
if (orte_forward_job_control) {
|
||||
pid = -pid;
|
||||
}
|
||||
pgrp = getpgid(pid);
|
||||
if (-1 != pgrp) {
|
||||
/* target the lead process of the process
|
||||
* group so we ensure that the signal is
|
||||
* seen by all members of that group. This
|
||||
* ensures that the signal is seen by any
|
||||
* child processes our child may have
|
||||
* started
|
||||
*/
|
||||
pid = pgrp;
|
||||
}
|
||||
if (0 != kill(pid, signum)) {
|
||||
if (ESRCH != errno) {
|
||||
OPAL_OUTPUT_VERBOSE((2, orte_odls_base_framework.framework_output,
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user