Skip to content

Commit 2451def

Browse files
committed
Merge pull request open-mpi#747 from rhc54/cmr2.0/waitpid
Need to delay registration of the waitpid callback until after the fo…
2 parents c213352 + 4f3786d commit 2451def

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

orte/mca/odls/base/odls_base_default_fns.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,12 +1035,11 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata)
10351035
}
10361036
}
10371037

1038-
orte_wait_cb(child, odls_base_default_wait_local_proc, NULL);
10391038
if (ORTE_SUCCESS != (rc = fork_local(app, child, app->env, jobdat))) {
1040-
orte_wait_cb_cancel(child);
10411039
child->exit_code = ORTE_ERR_SILENT; /* error message already output */
10421040
ORTE_ACTIVATE_PROC_STATE(&child->name, ORTE_PROC_STATE_FAILED_TO_START);
10431041
}
1042+
orte_wait_cb(child, odls_base_default_wait_local_proc, NULL);
10441043
/* if we indexed the argv, we need to restore it to
10451044
* its original form
10461045
*/

orte/util/proc_info.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ typedef uint32_t orte_proc_type_t;
6161
#define ORTE_PROC_DVM 0x0102 // DVM + daemon
6262
#define ORTE_PROC_IOF_ENDPT 0x1000
6363
#define ORTE_PROC_SCHEDULER 0x2000
64-
#define ORTE_PROC_MASTER 0x4004 // Master + HNP
64+
#define ORTE_PROC_MASTER_ACTUAL 0x4000
65+
#define ORTE_PROC_MASTER (ORTE_PROC_MASTER_ACTUAL + ORTE_PROC_HNP)
6566

6667
#define ORTE_PROC_IS_SINGLETON (ORTE_PROC_SINGLETON & orte_process_info.proc_type)
6768
#define ORTE_PROC_IS_DAEMON (ORTE_PROC_DAEMON & orte_process_info.proc_type)
@@ -75,7 +76,7 @@ typedef uint32_t orte_proc_type_t;
7576
#define ORTE_PROC_IS_DVM (ORTE_PROC_DVM & orte_process_info.proc_type)
7677
#define ORTE_PROC_IS_IOF_ENDPT (ORTE_PROC_IOF_ENDPT & orte_process_info.proc_type)
7778
#define ORTE_PROC_IS_SCHEDULER (ORTE_PROC_SCHEDULER & orte_process_info.proc_type)
78-
#define ORTE_PROC_IS_MASTER (ORTE_PROC_MASTER & orte_process_info.proc_type)
79+
#define ORTE_PROC_IS_MASTER (ORTE_PROC_MASTER_ACTUAL & orte_process_info.proc_type)
7980

8081

8182
/**

0 commit comments

Comments
 (0)