@@ -193,18 +193,18 @@ static bool odls_default_child_died(orte_proc_t *child)
193
193
* that occasionally causes us to incorrectly report a proc
194
194
* as refusing to die. Unfortunately, errno may not be reset
195
195
* 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.)
203
203
*/
204
204
OPAL_OUTPUT_VERBOSE ((20 , orte_odls_base_framework .framework_output ,
205
205
"%s odls:default:WAITPID INDICATES PID %d MAY HAVE ALREADY EXITED" ,
206
206
ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ), (int )(child -> pid )));
207
- /* Do nothing, process still alive */
207
+ /* Do nothing, process still alive */
208
208
} else if (-1 == ret && ECHILD == errno ) {
209
209
/* The pid no longer exists, so we'll call this "good
210
210
enough for government work" */
@@ -228,23 +228,10 @@ static bool odls_default_child_died(orte_proc_t *child)
228
228
return false;
229
229
}
230
230
231
+
232
+ /* deliver a signal to a specified pid. */
231
233
static int odls_default_kill_local (pid_t pid , int signum )
232
234
{
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
248
235
if (0 != kill (pid , signum )) {
249
236
if (ESRCH != errno ) {
250
237
OPAL_OUTPUT_VERBOSE ((2 , orte_odls_base_framework .framework_output ,
@@ -391,13 +378,6 @@ static int do_child(orte_app_context_t* context,
391
378
long fd , fdmax = sysconf (_SC_OPEN_MAX );
392
379
char * param , * msg ;
393
380
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
-
401
381
/* Setup the pipe to be close-on-exec */
402
382
opal_fd_set_cloexec (write_fd );
403
383
@@ -720,10 +700,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context,
720
700
}
721
701
722
702
if (pid == 0 ) {
723
- close (p [0 ]);
724
- #if HAVE_SETPGID
725
- setpgid (0 , 0 );
726
- #endif
703
+ close (p [0 ]);
727
704
do_child (context , child , environ_copy , jobdat , p [1 ], opts );
728
705
/* Does not return */
729
706
}
@@ -770,11 +747,6 @@ static int send_signal(pid_t pid, int signal)
770
747
ORTE_NAME_PRINT (ORTE_PROC_MY_NAME ),
771
748
signal , (long )pid ));
772
749
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
- }
778
750
if (kill (pid , signal ) != 0 ) {
779
751
switch (errno ) {
780
752
case EINVAL :
0 commit comments