src/mca/odls/default/odls_default_module.c
/* deliver a signal to a specified pid. */
deliver a signal to a specified pid.
deliver a signal to a specified pid .
static int odls_default_kill_local(pid_t pid, int signum)
{
    pid_t pgrp;
#if HAVE_SETPGID
    pgrp = getpgid(pid);
    if (-1 != pgrp) {
        pid = -pgrp;
    }
#endif
    if (0 != kill(pid, signum)) {
        if (ESRCH != errno) {
            PRTE_OUTPUT_VERBOSE((2, prte_odls_base_framework.framework_output,
                                 "%s odls:default:SENT KILL %d TO PID %d GOT ERRNO %d",
                                 PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), signum, (int) pid, errno));
            return errno;
        }
    }
    PRTE_OUTPUT_VERBOSE((2, prte_odls_base_framework.framework_output,
                         "%s odls:default:SENT KILL %d TO PID %d SUCCESS",
                         PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), signum, (int) pid));
    return 0;
}
static int odls_default_kill_local ( pid_t pid , int signum ) { pid_t pgrp ; #if HAVE_SETPGID pgrp = getpgid ( pid ) ; if ( -1 != pgrp ) { pid = - pgrp ; } #endif if ( 0 != kill ( pid , signum ) ) { if ( ESRCH != errno ) { PRTE_OUTPUT_VERBOSE ( ( 2 , prte_odls_base_framework . framework_output , " " , PRTE_NAME_PRINT ( PRTE_PROC_MY_NAME ) , signum , ( int ) pid , errno ) ) ; return errno ; } } PRTE_OUTPUT_VERBOSE ( ( 2 , prte_odls_base_framework . framework_output , " " , PRTE_NAME_PRINT ( PRTE_PROC_MY_NAME ) , signum , ( int ) pid ) ) ; return 0 ; }
deliver a signal to a specified pid.
deliver a signal to a specified pid .
/* 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
         */