If the urm gets a request to kill itself *and* it's a singleton, just
exit out, rather than trying to have the pls exit. Since singletons weren't started with a pls, there's no way the pls is going to be able to kill the process. So just exit and save the error message. This commit was SVN r9859.
Этот коммит содержится в:
родитель
0c34d5c9e6
Коммит
1c0c84cf67
@ -194,8 +194,21 @@ static int orte_rmgr_urm_launch(orte_jobid_t jobid)
|
||||
|
||||
static int orte_rmgr_urm_terminate_job(orte_jobid_t jobid)
|
||||
{
|
||||
int ret;
|
||||
orte_jobid_t my_jobid;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
ret = orte_ns.get_jobid(&my_jobid, orte_process_info.my_name);
|
||||
if (ORTE_SUCCESS == ret) {
|
||||
/* if our jobid is the one we're trying to kill AND we're a
|
||||
singleton, then calling the urm_pls isn't going to be able
|
||||
to do anything. Just call exit. */
|
||||
if (orte_process_info.singleton && jobid == my_jobid) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
return mca_rmgr_urm_component.urm_pls->terminate_job(jobid);
|
||||
}
|
||||
|
||||
@ -203,6 +216,16 @@ static int orte_rmgr_urm_terminate_proc(const orte_process_name_t* proc_name)
|
||||
{
|
||||
OPAL_TRACE(1);
|
||||
|
||||
if ((0 == orte_ns.compare(ORTE_NS_CMP_ALL, proc_name,
|
||||
orte_process_info.my_name)) &&
|
||||
(orte_process_info.singleton)) {
|
||||
/* if we're trying to get ourselves killed and we're a
|
||||
singleton, calling terminate_proc isn't going to work
|
||||
properly -- there's no pls setup properly for us. Just
|
||||
call exit and be done. */
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return mca_rmgr_urm_component.urm_pls->terminate_proc(proc_name);
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user