# coding: utf-8 # AUTO-GENERATED FILE -- DO NOT EDIT """ This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [Unix only] signal() -- set the action for a given signal getsignal() -- get the signal action for a given signal pause() -- wait until a signal arrives [Unix only] default_int_handler() -- default SIGINT handler signal constants: SIG_DFL -- used to refer to the system default handler SIG_IGN -- used to ignore the signal NSIG -- number of defined signals SIGINT, SIGTERM, etc. -- signal numbers itimer constants: ITIMER_REAL -- decrements in real time, and delivers SIGALRM upon expiration ITIMER_VIRTUAL -- decrements only when the process is executing, and delivers SIGVTALRM upon expiration ITIMER_PROF -- decrements both when the process is executing and when the system is executing on behalf of the process. Coupled with ITIMER_VIRTUAL, this timer is usually used to profile the time spent by the application in user and kernel space. SIGPROF is delivered upon expiration. *** IMPORTANT NOTICE *** A signal handler function is called with two arguments: the first is the signal number, the second is the interrupted stack frame. """ ITIMER_PROF = 2 ITIMER_REAL = 0 ITIMER_VIRTUAL = 1 class ItimerError(OSError): pass NSIG = 65 SIGABRT = 6 SIGALRM = 14 SIGBUS = 7 SIGCHLD = 17 SIGCLD = 17 SIGCONT = 18 SIGFPE = 8 SIGHUP = 1 SIGILL = 4 SIGINT = 2 SIGIO = 29 SIGIOT = 6 SIGKILL = 9 SIGPIPE = 13 SIGPOLL = 29 SIGPROF = 27 SIGPWR = 30 SIGQUIT = 3 SIGRTMAX = 64 SIGRTMIN = 34 SIGSEGV = 11 SIGSTKFLT = 16 SIGSTOP = 19 SIGSYS = 31 SIGTERM = 15 SIGTRAP = 5 SIGTSTP = 20 SIGTTIN = 21 SIGTTOU = 22 SIGURG = 23 SIGUSR1 = 10 SIGUSR2 = 12 SIGVTALRM = 26 SIGWINCH = 28 SIGXCPU = 24 SIGXFSZ = 25 SIG_BLOCK = 0 SIG_DFL = 0 SIG_IGN = 1 SIG_SETMASK = 2 SIG_UNBLOCK = 1 __doc__ = """This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [Unix only] signal() -- set the action for a given signal getsignal() -- get the signal action for a given signal pause() -- wait until a signal arrives [Unix only] default_int_handler() -- default SIGINT handler signal constants: SIG_DFL -- used to refer to the system default handler SIG_IGN -- used to ignore the signal NSIG -- number of defined signals SIGINT, SIGTERM, etc. -- signal numbers itimer constants: ITIMER_REAL -- decrements in real time, and delivers SIGALRM upon expiration ITIMER_VIRTUAL -- decrements only when the process is executing, and delivers SIGVTALRM upon expiration ITIMER_PROF -- decrements both when the process is executing and when the system is executing on behalf of the process. Coupled with ITIMER_VIRTUAL, this timer is usually used to profile the time spent by the application in user and kernel space. SIGPROF is delivered upon expiration. *** IMPORTANT NOTICE *** A signal handler function is called with two arguments: the first is the signal number, the second is the interrupted stack frame.""" class __loader__(object): """ Meta path import for built-in modules. All methods are either class or static methods to avoid the need to instantiate the class. """ _ORIGIN = 'built-in' def create_module(self, spec): """ Create a built-in module """ pass def exec_module(self, module): """ Exec a built-in module """ pass def find_spec(self, fullname, path=None, target=None): pass def get_code(self, fullname): """ Return None as built-in modules do not have code objects. """ pass def get_source(self, fullname): """ Return None as built-in modules do not have source code. """ pass def is_package(self, fullname): """ Return False as built-in modules are never packages. """ pass def load_module(self, fullname): """ Load the specified module into sys.modules and return it. This method is deprecated. Use loader.exec_module() instead. """ pass __name__ = '_signal' __package__ = '' __spec__ = None def alarm(seconds): """ Arrange for SIGALRM to arrive after the given number of seconds. """ pass def default_int_handler(signalnum, frame): """ The default handler for SIGINT installed by Python. It raises KeyboardInterrupt. """ pass def getitimer(which): """ Returns current value of given itimer. """ pass def getsignal(signalnum): """ Return the current action for the given signal. The return value can be: SIG_IGN -- if the signal is being ignored SIG_DFL -- if the default action for the signal is in effect None -- if an unknown handler is in effect anything else -- the callable Python object used as a handler """ return None def pause(): """ Wait until a signal arrives. """ pass def pidfd_send_signal(pidfd, signalnum, siginfo=None, flags=0): """ Send a signal to a process referred to by a pid file descriptor. """ pass def pthread_kill(thread_id, signalnum): """ Send a signal to a thread. """ pass def pthread_sigmask(how, mask): """ Fetch and/or change the signal mask of the calling thread. """ pass def raise_signal(signalnum): """ Send a signal to the executing process. """ pass def set_wakeup_fd(fd, arg0, warn_on_full_buffer=True): """ set_wakeup_fd(fd, *, warn_on_full_buffer=True) -> fd Sets the fd to be written to (with the signal number) when a signal comes in. A library can use this to wakeup select or poll. The previous fd or -1 is returned. The fd must be non-blocking. """ return None def setitimer(which, seconds, interval=0.0): """ Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL or ITIMER_PROF). The timer will fire after value seconds and after that every interval seconds. The itimer can be cleared by setting seconds to zero. Returns old values as a tuple: (delay, interval). """ pass def siginterrupt(signalnum, flag): """ Change system call restart behaviour. If flag is False, system calls will be restarted when interrupted by signal sig, else system calls will be interrupted. """ pass def signal(signalnum, handler): """ Set the action for the given signal. The action can be SIG_DFL, SIG_IGN, or a callable Python object. The previous action is returned. See getsignal() for possible return values. *** IMPORTANT NOTICE *** A signal handler function is called with two arguments: the first is the signal number, the second is the interrupted stack frame. """ pass def sigpending(): """ Examine pending signals. Returns a set of signal numbers that are pending for delivery to the calling thread. """ pass def sigtimedwait(sigset, timeout): """ Like sigwaitinfo(), but with a timeout. The timeout is specified in seconds, with floating point numbers allowed. """ pass def sigwait(sigset): """ Wait for a signal. Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set sigset. The function accepts the signal and returns the signal number. """ pass def sigwaitinfo(sigset): """ Wait synchronously until one of the signals in *sigset* is delivered. Returns a struct_siginfo containing information about the signal. """ pass def strsignal(signalnum): """ Return the system description of the given signal. Returns the description of signal *signalnum*, such as "Interrupt" for :const:`SIGINT`. Returns :const:`None` if *signalnum* has no description. Raises :exc:`ValueError` if *signalnum* is invalid. """ pass class struct_siginfo(tuple): """ struct_siginfo: Result from sigwaitinfo or sigtimedwait. This object may be accessed either as a tuple of (si_signo, si_code, si_errno, si_pid, si_uid, si_status, si_band), or via the attributes si_signo, si_code, and so on. """ n_fields = 7 n_sequence_fields = 7 n_unnamed_fields = 0 si_band = None si_code = None si_errno = None si_pid = None si_signo = None si_status = None si_uid = None def valid_signals(): """ Return a set of valid signal numbers on this platform. The signal numbers returned by this function can be safely passed to functions like `pthread_sigmask`. """ pass