@@ -193,18 +193,18 @@ static bool odls_default_child_died(orte_proc_t *child)
193193 * that occasionally causes us to incorrectly report a proc
194194 * as refusing to die. Unfortunately, errno may not be reset
195195 * by waitpid in this case, so we cannot check it.
196- *
197- * (note the previous fix to this, to return 'process dead'
198- * here, fixes the race condition at the cost of reporting
199- * all live processes have immediately died! Better to
200- * occasionally report a dead process as still living -
201- * which will occasionally trip the timeout for cases that
202- * are right on the edge.)
196+ *
197+ * (note the previous fix to this, to return 'process dead'
198+ * here, fixes the race condition at the cost of reporting
199+ * all live processes have immediately died! Better to
200+ * occasionally report a dead process as still living -
201+ * which will occasionally trip the timeout for cases that
202+ * are right on the edge.)
203203 */
204204 OPAL_OUTPUT_VERBOSE ((20 , orte_odls_base_framework .framework_output ,
205205 "%s odls:default:WAITPID INDICATES PID %d MAY HAVE ALREADY EXITED" ,
206206 ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ), (int )(child -> pid )));
207- /* Do nothing, process still alive */
207+ /* Do nothing, process still alive */
208208 } else if (-1 == ret && ECHILD == errno ) {
209209 /* The pid no longer exists, so we'll call this "good
210210 enough for government work" */
@@ -228,23 +228,10 @@ static bool odls_default_child_died(orte_proc_t *child)
228228 return false;
229229}
230230
231+
232+ /* deliver a signal to a specified pid. */
231233static int odls_default_kill_local (pid_t pid , int signum )
232234{
233- pid_t pgrp ;
234-
235- #if HAVE_SETPGID
236- pgrp = getpgid (pid );
237- if (-1 != pgrp ) {
238- /* target the lead process of the process
239- * group so we ensure that the signal is
240- * seen by all members of that group. This
241- * ensures that the signal is seen by any
242- * child processes our child may have
243- * started
244- */
245- pid = pgrp ;
246- }
247- #endif
248235 if (0 != kill (pid , signum )) {
249236 if (ESRCH != errno ) {
250237 OPAL_OUTPUT_VERBOSE ((2 , orte_odls_base_framework .framework_output ,
@@ -391,13 +378,6 @@ static int do_child(orte_app_context_t* context,
391378 long fd , fdmax = sysconf (_SC_OPEN_MAX );
392379 char * param , * msg ;
393380
394- if (orte_forward_job_control ) {
395- /* Set a new process group for this child, so that a
396- SIGSTOP can be sent to it without being sent to the
397- orted. */
398- setpgid (0 , 0 );
399- }
400-
401381 /* Setup the pipe to be close-on-exec */
402382 opal_fd_set_cloexec (write_fd );
403383
@@ -720,10 +700,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context,
720700 }
721701
722702 if (pid == 0 ) {
723- close (p [0 ]);
724- #if HAVE_SETPGID
725- setpgid (0 , 0 );
726- #endif
703+ close (p [0 ]);
727704 do_child (context , child , environ_copy , jobdat , p [1 ], opts );
728705 /* Does not return */
729706 }
@@ -770,11 +747,6 @@ static int send_signal(pid_t pid, int signal)
770747 ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),
771748 signal , (long )pid ));
772749
773- if (orte_forward_job_control ) {
774- /* Send the signal to the process group rather than the
775- process. The child is the leader of its process group. */
776- pid = - pid ;
777- }
778750 if (kill (pid , signal ) != 0 ) {
779751 switch (errno ) {
780752 case EINVAL :
0 commit comments