Home | History | Annotate | Download | only in cros

Lines Matching defs:handler

15 def handler(signum, frame):
17 Register a handler for the timeout.
24 Try installing a sigalarm handler.
27 sigalarm handler, so our function will feel the full force of a sigalarm
28 even if we try to install a pacifying signal handler. To avoid this we
29 need to confirm that the handler we tried to install really was installed.
31 @param new_handler: The new handler to install. This must be a callable
40 logging.warning('Trying to install an invalid sigalarm handler.')
85 installed_handler = install_sigalarm_handler(handler)
89 # If old_timeout_time = 0 we either didn't install a handler, or sigalrm
90 # had a signal.SIG_DFL handler with 0 timeout. In the latter case we still
91 # need to restore the handler/timeout.
100 # If we installed a sigalarm handler, cancel it since our function
101 # returned on time. If we can successfully restore the old handler,