# 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 = 32 SIGABRT = 6 SIGALRM = 14 SIGBUS = 10 SIGCHLD = 20 SIGCONT = 19 SIGEMT = 7 SIGFPE = 8 SIGHUP = 1 SIGILL = 4 SIGINFO = 29 SIGINT = 2 SIGIO = 23 SIGIOT = 6 SIGKILL = 9 SIGPIPE = 13 SIGPROF = 27 SIGQUIT = 3 SIGSEGV = 11 SIGSTOP = 17 SIGSYS = 12 SIGTERM = 15 SIGTRAP = 5 SIGTSTP = 18 SIGTTIN = 21 SIGTTOU = 22 SIGURG = 16 SIGUSR1 = 30 SIGUSR2 = 31 SIGVTALRM = 26 SIGWINCH = 28 SIGXCPU = 24 SIGXFSZ = 25 SIG_BLOCK = 1 SIG_DFL = 0 SIG_IGN = 1 SIG_SETMASK = 3 SIG_UNBLOCK = 2 __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. """ def find_module(self, cls, fullname, path): """ Find the built-in module. If 'path' is ever specified then the search is considered a failure. """ 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): """ Load a built-in module. """ pass def module_repr(self, cls, module): pass __name__ = 'signal' __package__ = '' def alarm(seconds): """ alarm(seconds) Arrange for SIGALRM to arrive after the given number of seconds. """ pass def default_int_handler(*args): """ default_int_handler(...) The default handler for SIGINT installed by Python. It raises KeyboardInterrupt. """ pass def getitimer(which): """ getitimer(which) Returns current value of given itimer. """ pass def getsignal(sig): """ getsignal(sig) -> action 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(): """ pause() Wait until a signal arrives. """ pass def pthread_kill(thread_id, signum): """ pthread_kill(thread_id, signum) Send a signal to a thread. """ pass def pthread_sigmask(how, mask): """ pthread_sigmask(how, mask) -> old mask Fetch and/or change the signal mask of the calling thread. """ return None def set_wakeup_fd(fd): """ set_wakeup_fd(fd) -> fd Sets the fd to be written to (with '\\0') when a signal comes in. A library can use this to wakeup select or poll. The previous fd is returned. The fd must be non-blocking. """ return None def setitimer(which, seconds, interval=None): """ setitimer(which, seconds[, interval]) Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL or ITIMER_PROF) to 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(sig, flag): """ siginterrupt(sig, flag) -> None 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. """ return None def signal(sig, action): """ signal(sig, action) -> action 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. """ return None def sigpending(): """ sigpending() -> list Examine pending signals. """ return [] def sigwait(sigset): """ sigwait(sigset) -> signum Wait a signal. """ return None