Skip to content

Commit 8b2ef75

Browse files
author
Ralph Castain
authored
Merge pull request #2848 from jjhursey/topic/ibm/v1.10/stacktrace-fix
v1.10: opal/stacktace: Raise the signal after processing
2 parents d3bdef4 + 4c33e2b commit 8b2ef75

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

opal/util/stacktrace.c

Lines changed: 9 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
@@ -348,6 +349,14 @@ static void show_stackframe (int signo, siginfo_t * info, void * p)
348349
} else {
349350
write(fileno(stderr), unable_to_print_msg, strlen(unable_to_print_msg));
350351
}
352+
353+
/* Raise the signal again, so we don't accidentally mask critical signals.
354+
* For critical signals, it is preferred that we call 'raise' instead of
355+
* 'exit' or 'abort' so that the return status is set properly for this
356+
* process.
357+
*/
358+
signal(signo, SIG_DFL);
359+
raise(signo);
351360
}
352361

353362
#endif /* OPAL_WANT_PRETTY_PRINT_STACKTRACE && ! defined(__WINDOWS__) */

0 commit comments

Comments
 (0)