Markdown Format | JSON API | MCP Server Tool
Help on module signal: NAME signal MODULE REFERENCE https://docs.python.org/3.10/library/signal.html The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. CLASSES builtins.OSError(builtins.Exception) itimer_error builtins.tuple(builtins.object) struct_siginfo enum.IntEnum(builtins.int, enum.Enum) Handlers Sigmasks Signals class Handlers(enum.IntEnum) | Handlers(value, names=None, *, module=None, qualname=None, type=None, start=1) | | An enumeration. | | Method resolution order: | Handlers | enum.IntEnum | builtins.int | enum.Enum | builtins.object | | Data and other attributes defined here: | | SIG_DFL = <Handlers.SIG_DFL: 0> | | SIG_IGN = <Handlers.SIG_IGN: 1> | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumMeta: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping. ItimerError = class itimer_error(builtins.OSError) | Method resolution order: | itimer_error | builtins.OSError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from builtins.OSError: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __reduce__(...) | Helper for pickle. | | __str__(self, /) | Return str(self). | | ---------------------------------------------------------------------- | Static methods inherited from builtins.OSError: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.OSError: | | characters_written | | errno | POSIX exception code | | filename | exception filename | | filename2 | second exception filename | | strerror | exception strerror | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class Sigmasks(enum.IntEnum) | Sigmasks(value, names=None, *, module=None, qualname=None, type=None, start=1) | | An enumeration. | | Method resolution order: | Sigmasks | enum.IntEnum | builtins.int | enum.Enum | builtins.object | | Data and other attributes defined here: | | SIG_BLOCK = <Sigmasks.SIG_BLOCK: 0> | | SIG_SETMASK = <Sigmasks.SIG_SETMASK: 2> | | SIG_UNBLOCK = <Sigmasks.SIG_UNBLOCK: 1> | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumMeta: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping. class Signals(enum.IntEnum) | Signals(value, names=None, *, module=None, qualname=None, type=None, start=1) | | An enumeration. | | Method resolution order: | Signals | enum.IntEnum | builtins.int | enum.Enum | builtins.object | | Data and other attributes defined here: | | SIGABRT = <Signals.SIGABRT: 6> | | SIGALRM = <Signals.SIGALRM: 14> | | SIGBUS = <Signals.SIGBUS: 7> | | SIGCHLD = <Signals.SIGCHLD: 17> | | SIGCONT = <Signals.SIGCONT: 18> | | SIGFPE = <Signals.SIGFPE: 8> | | SIGHUP = <Signals.SIGHUP: 1> | | SIGILL = <Signals.SIGILL: 4> | | SIGINT = <Signals.SIGINT: 2> | | SIGIO = <Signals.SIGIO: 29> | | SIGKILL = <Signals.SIGKILL: 9> | | SIGPIPE = <Signals.SIGPIPE: 13> | | SIGPROF = <Signals.SIGPROF: 27> | | SIGPWR = <Signals.SIGPWR: 30> | | SIGQUIT = <Signals.SIGQUIT: 3> | | SIGRTMAX = <Signals.SIGRTMAX: 64> | | SIGRTMIN = <Signals.SIGRTMIN: 34> | | SIGSEGV = <Signals.SIGSEGV: 11> | | SIGSTOP = <Signals.SIGSTOP: 19> | | SIGSYS = <Signals.SIGSYS: 31> | | SIGTERM = <Signals.SIGTERM: 15> | | SIGTRAP = <Signals.SIGTRAP: 5> | | SIGTSTP = <Signals.SIGTSTP: 20> | | SIGTTIN = <Signals.SIGTTIN: 21> | | SIGTTOU = <Signals.SIGTTOU: 22> | | SIGURG = <Signals.SIGURG: 23> | | SIGUSR1 = <Signals.SIGUSR1: 10> | | SIGUSR2 = <Signals.SIGUSR2: 12> | | SIGVTALRM = <Signals.SIGVTALRM: 26> | | SIGWINCH = <Signals.SIGWINCH: 28> | | SIGXCPU = <Signals.SIGXCPU: 24> | | SIGXFSZ = <Signals.SIGXFSZ: 25> | | ---------------------------------------------------------------------- | Data descriptors inherited from enum.Enum: | | name | The name of the Enum member. | | value | The value of the Enum member. | | ---------------------------------------------------------------------- | Readonly properties inherited from enum.EnumMeta: | | __members__ | Returns a mapping of member name->value. | | This mapping lists all enum members, including aliases. Note that this | is a read-only view of the internal mapping. class struct_siginfo(builtins.tuple) | struct_siginfo(iterable=(), /) | | 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. | | Method resolution order: | struct_siginfo | builtins.tuple | builtins.object | | Methods defined here: | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) from builtins.type | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | si_band | band event for SIGPOLL | | si_code | signal code | | si_errno | errno associated with this signal | | si_pid | sending process ID | | si_signo | signal number | | si_status | exit value or signal | | si_uid | real user ID of sending process | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __match_args__ = ('si_signo', 'si_code', 'si_errno', 'si_pid', 'si_uid... | | n_fields = 7 | | n_sequence_fields = 7 | | n_unnamed_fields = 0 | | ---------------------------------------------------------------------- | Methods inherited from builtins.tuple: | | __add__(self, value, /) | Return self+value. | | __contains__(self, key, /) | Return key in self. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, key, /) | Return self[key]. | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __rmul__(self, value, /) | Return value*self. | | count(self, value, /) | Return number of occurrences of value. | | index(self, value, start=0, stop=9223372036854775807, /) | Return first index of value. | | Raises ValueError if the value is not present. | | ---------------------------------------------------------------------- | Class methods inherited from builtins.tuple: | | __class_getitem__(...) from builtins.type | See PEP 585 FUNCTIONS alarm(seconds, /) Arrange for SIGALRM to arrive after the given number of seconds. default_int_handler(signalnum, frame, /) The default handler for SIGINT installed by Python. It raises KeyboardInterrupt. getitimer(which, /) Returns current value of given itimer. 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 pause() Wait until a signal arrives. pidfd_send_signal(pidfd, signalnum, siginfo=None, flags=0, /) Send a signal to a process referred to by a pid file descriptor. pthread_kill(thread_id, signalnum, /) Send a signal to a thread. pthread_sigmask(how, mask) Fetch and/or change the signal mask of the calling thread. raise_signal(signalnum, /) Send a signal to the executing process. set_wakeup_fd(...) 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. 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). 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. 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. sigpending() Examine pending signals. Returns a set of signal numbers that are pending for delivery to the calling thread. sigtimedwait(sigset, timeout, /) Like sigwaitinfo(), but with a timeout. The timeout is specified in seconds, with floating point numbers allowed. 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. sigwaitinfo(sigset, /) Wait synchronously until one of the signals in *sigset* is delivered. Returns a struct_siginfo containing information about the signal. strsignal(signalnum, /) Return the system description of the given signal. The return values can be such as "Interrupt", "Segmentation fault", etc. Returns None if the signal is not recognized. 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`. DATA ITIMER_PROF = 2 ITIMER_REAL = 0 ITIMER_VIRTUAL = 1 NSIG = 65 SIGABRT = <Signals.SIGABRT: 6> SIGALRM = <Signals.SIGALRM: 14> SIGBUS = <Signals.SIGBUS: 7> SIGCHLD = <Signals.SIGCHLD: 17> SIGCLD = <Signals.SIGCHLD: 17> SIGCONT = <Signals.SIGCONT: 18> SIGFPE = <Signals.SIGFPE: 8> SIGHUP = <Signals.SIGHUP: 1> SIGILL = <Signals.SIGILL: 4> SIGINT = <Signals.SIGINT: 2> SIGIO = <Signals.SIGIO: 29> SIGIOT = <Signals.SIGABRT: 6> SIGKILL = <Signals.SIGKILL: 9> SIGPIPE = <Signals.SIGPIPE: 13> SIGPOLL = <Signals.SIGIO: 29> SIGPROF = <Signals.SIGPROF: 27> SIGPWR = <Signals.SIGPWR: 30> SIGQUIT = <Signals.SIGQUIT: 3> SIGRTMAX = <Signals.SIGRTMAX: 64> SIGRTMIN = <Signals.SIGRTMIN: 34> SIGSEGV = <Signals.SIGSEGV: 11> SIGSTOP = <Signals.SIGSTOP: 19> SIGSYS = <Signals.SIGSYS: 31> SIGTERM = <Signals.SIGTERM: 15> SIGTRAP = <Signals.SIGTRAP: 5> SIGTSTP = <Signals.SIGTSTP: 20> SIGTTIN = <Signals.SIGTTIN: 21> SIGTTOU = <Signals.SIGTTOU: 22> SIGURG = <Signals.SIGURG: 23> SIGUSR1 = <Signals.SIGUSR1: 10> SIGUSR2 = <Signals.SIGUSR2: 12> SIGVTALRM = <Signals.SIGVTALRM: 26> SIGWINCH = <Signals.SIGWINCH: 28> SIGXCPU = <Signals.SIGXCPU: 24> SIGXFSZ = <Signals.SIGXFSZ: 25> SIG_BLOCK = <Sigmasks.SIG_BLOCK: 0> SIG_DFL = <Handlers.SIG_DFL: 0> SIG_IGN = <Handlers.SIG_IGN: 1> SIG_SETMASK = <Sigmasks.SIG_SETMASK: 2> SIG_UNBLOCK = <Sigmasks.SIG_UNBLOCK: 1> FILE /usr/lib/python3.10/signal.py
Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:15 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)