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 <jhursey@us.ibm.com>
Этот коммит содержится в:
родитель
dba106ee10
Коммит
f8918e37a9
@ -11,6 +11,7 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
* Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -343,6 +344,14 @@ static void show_stackframe (int signo, siginfo_t * info, void * p)
|
|||||||
} else {
|
} else {
|
||||||
write(fileno(stderr), unable_to_print_msg, strlen(unable_to_print_msg));
|
write(fileno(stderr), unable_to_print_msg, strlen(unable_to_print_msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Raise the signal again, so we don't accidentally mask critical signals.
|
||||||
|
* For critical signals, it is preferred that we call 'raise' instead of
|
||||||
|
* 'exit' or 'abort' so that the return status is set properly for this
|
||||||
|
* process.
|
||||||
|
*/
|
||||||
|
signal(signo, SIG_DFL);
|
||||||
|
raise(signo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* OPAL_WANT_PRETTY_PRINT_STACKTRACE */
|
#endif /* OPAL_WANT_PRETTY_PRINT_STACKTRACE */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user