Lines Matching defs:handler
131 handler fails in faulthandler_fatal_error() */
304 faulthandler_disable_fatal_handler(fault_handler_t *handler)
306 if (!handler->enabled)
308 handler->enabled = 0;
310 (void)sigaction(handler->signum, &handler->previous, NULL);
312 (void)signal(handler->signum, handler->previous);
319 Display the current Python traceback, restore the previous handler and call
320 the previous handler.
322 On Windows, don't explicitly call the previous handler, because the Windows
323 signal handler would not be called (for an unknown reason). The execution of
325 instruction will raise the same fault (signal), and so the previous handler
335 fault_handler_t *handler = NULL;
343 handler = &faulthandler_handlers[i];
344 if (handler->signum == signum) {
349 if (handler == NULL) {
354 /* restore the previous handler */
355 faulthandler_disable_fatal_handler(handler);
359 PUTS(fd, handler->name);
378 /* don't explicitly call the previous handler for SIGSEGV in this signal
379 handler, because the Windows signal handler would not be called */
383 /* call the previous signal handler: it is called immediately if we use
414 /* ignore the exception: call the next exception handler */
436 /* disable signal handler for SIGSEGV */
438 fault_handler_t *handler = &faulthandler_handlers[i];
439 if (handler->signum == SIGSEGV) {
440 faulthandler_disable_fatal_handler(handler);
449 /* call the next exception handler */
462 /* Allocate an alternate stack for faulthandler() signal handler
463 to be able to execute a signal handler on a stack overflow error */
484 /* Install the handler for fatal signals, faulthandler_fatal_error(). */
501 fault_handler_t *handler;
504 handler = &faulthandler_handlers[i];
505 assert(!handler->enabled);
511 its own signal handler */
515 /* Call the signal handler on an alternate signal stack
519 err = sigaction(handler->signum, &action, &handler->previous);
521 handler->previous = signal(handler->signum,
523 err = (handler->previous == SIG_ERR);
530 handler->enabled = 1;
580 fault_handler_t *handler;
581 handler = &faulthandler_handlers[i];
582 faulthandler_disable_fatal_handler(handler);
825 own signal handler */
830 /* Call the signal handler on an alternate signal stack
869 /* call the previous signal handler */
879 /* call the previous signal handler */
1055 handler and then gives back the execution flow to the program (without
1056 explicitly calling the previous error handler). In a normal case, the
1064 handler. */
1244 "enable the fault handler")},
1246 PyDoc_STR("disable(): disable the fault handler")},
1248 PyDoc_STR("is_enabled()->bool: check if the handler is enabled")},
1268 "register a handler for the signal 'signum': dump the "
1273 PyDoc_STR("unregister(signum): unregister the handler of the signal "
1375 SIGSTKSZ bytes. Calling the previous signal handler in faulthandler
1376 signal handler uses more than SIGSTKSZ bytes of stack memory on some