Skip to content

Commit 0b115a7

Browse files
committed
opal/stacktace: Raise the signal after processing
- This prevents us for accidentally masking a signal that was meant to terminate the application. Signed-off-by: Joshua Hursey <[email protected]>
1 parent dba106e commit 0b115a7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

opal/util/stacktrace.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
1313
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
14+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -343,6 +344,13 @@ static void show_stackframe (int signo, siginfo_t * info, void * p)
343344
} else {
344345
write(fileno(stderr), unable_to_print_msg, strlen(unable_to_print_msg));
345346
}
347+
348+
/* Raise the signal again, so we don't accidentally mask critical signals.
349+
* For critical signals, it is preferred that we call 'raise' instead of
350+
* 'exit' or 'abort' so that the return status is set properly for this
351+
* process.
352+
*/
353+
raise(signo);
346354
}
347355

348356
#endif /* OPAL_WANT_PRETTY_PRINT_STACKTRACE */

0 commit comments

Comments
 (0)