{
    "mode": "man",
    "parameter": "signal",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/signal/7/json",
    "generated": "2026-06-02T15:55:32Z",
    "sections": {
        "NAME": {
            "content": "signal - overview of signals\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Linux  supports  both POSIX reliable signals (hereinafter \"standard signals\") and POSIX real-\ntime signals.\n",
            "subsections": [
                {
                    "name": "Signal dispositions",
                    "content": "Each signal has a current disposition, which determines how the process behaves  when  it  is\ndelivered the signal.\n\nThe  entries  in  the  \"Action\" column of the table below specify the default disposition for\neach signal, as follows:\n\nTerm   Default action is to terminate the process.\n\nIgn    Default action is to ignore the signal.\n\nCore   Default action is to terminate the process and dump core (see core(5)).\n\nStop   Default action is to stop the process.\n\nCont   Default action is to continue the process if it is currently stopped.\n\nA process can change the disposition of a signal using sigaction(2) or signal(2).  (The  lat‐\nter  is  less portable when establishing a signal handler; see signal(2) for details.)  Using\nthese system calls, a process can elect one of the following behaviors to occur  on  delivery\nof the signal: perform the default action; ignore the signal; or catch the signal with a sig‐\nnal handler, a programmer-defined function that is automatically invoked when the  signal  is\ndelivered.\n\nBy  default,  a signal handler is invoked on the normal process stack.  It is possible to ar‐\nrange that the signal handler uses an alternate stack; see sigaltstack(2) for a discussion of\nhow to do this and when it might be useful.\n\nThe signal disposition is a per-process attribute: in a multithreaded application, the dispo‐\nsition of a particular signal is the same for all threads.\n\nA child created via fork(2) inherits a copy of its parent's signal dispositions.   During  an\nexecve(2),  the dispositions of handled signals are reset to the default; the dispositions of\nignored signals are left unchanged.\n"
                },
                {
                    "name": "Sending a signal",
                    "content": "The following system calls and library functions allow the caller to send a signal:\n\nraise(3)\nSends a signal to the calling thread.\n\nkill(2)\nSends a signal to a specified process, to all members of a specified process group, or\nto all processes on the system.\n\npidfdsendsignal(2)\nSends a signal to a process identified by a PID file descriptor.\n\nkillpg(3)\nSends a signal to all of the members of a specified process group.\n\npthreadkill(3)\nSends a signal to a specified POSIX thread in the same process as the caller.\n\ntgkill(2)\nSends  a  signal to a specified thread within a specific process.  (This is the system\ncall used to implement pthreadkill(3).)\n\nsigqueue(3)\nSends a real-time signal with accompanying data to a specified process.\n"
                },
                {
                    "name": "Waiting for a signal to be caught",
                    "content": "The following system calls suspend execution of the calling thread until a signal  is  caught\n(or an unhandled signal terminates the process):\n\npause(2)\nSuspends execution until any signal is caught.\n\nsigsuspend(2)\nTemporarily  changes  the  signal mask (see below) and suspends execution until one of\nthe unmasked signals is caught.\n"
                },
                {
                    "name": "Synchronously accepting a signal",
                    "content": "Rather than asynchronously catching a signal via a signal handler, it  is  possible  to  syn‐\nchronously  accept  the signal, that is, to block execution until the signal is delivered, at\nwhich point the kernel returns information about the signal to the  caller.   There  are  two\ngeneral ways to do this:\n\n* sigwaitinfo(2),  sigtimedwait(2), and sigwait(3) suspend execution until one of the signals\nin a specified set is delivered.  Each of these calls returns information about the  deliv‐\nered signal.\n\n* signalfd(2)  returns  a  file descriptor that can be used to read information about signals\nthat are delivered to the caller.  Each read(2) from this file descriptor blocks until  one\nof  the  signals  in  the set specified in the signalfd(2) call is delivered to the caller.\nThe buffer returned by read(2) contains a structure describing the signal.\n"
                },
                {
                    "name": "Signal mask and pending signals",
                    "content": "A signal may be blocked, which means that it will not be delivered  until  it  is  later  un‐\nblocked.   Between the time when it is generated and when it is delivered a signal is said to\nbe pending.\n\nEach thread in a process has an independent signal mask, which indicates the set  of  signals\nthat  the  thread  is  currently  blocking.   A  thread  can manipulate its signal mask using\npthreadsigmask(3).  In a traditional single-threaded application, sigprocmask(2) can be used\nto manipulate the signal mask.\n\nA  child  created via fork(2) inherits a copy of its parent's signal mask; the signal mask is\npreserved across execve(2).\n\nA signal may be process-directed or thread-directed.  A process-directed signal is  one  that\nis  targeted  at  (and thus pending for) the process as a whole.  A signal may be process-di‐\nrected because it was generated by the kernel for reasons other than a hardware exception, or\nbecause  it  was  sent using kill(2) or sigqueue(3).  A thread-directed signal is one that is\ntargeted at a specific thread.  A signal may be thread-directed because it was generated as a\nconsequence  of  executing  a specific machine-language instruction that triggered a hardware\nexception (e.g., SIGSEGV for an invalid memory access, or SIGFPE for a math  error),  or  be‐\ncause  it  was  targeted  at  a  specific  thread  using  interfaces  such  as  tgkill(2)  or\npthreadkill(3).\n\nA process-directed signal may be delivered to any one of the threads that does not  currently\nhave  the signal blocked.  If more than one of the threads has the signal unblocked, then the\nkernel chooses an arbitrary thread to which to deliver the signal.\n\nA thread can obtain the set of signals that it currently  has  pending  using  sigpending(2).\nThis set will consist of the union of the set of pending process-directed signals and the set\nof signals pending for the calling thread.\n\nA child created via fork(2) initially has an empty pending signal set; the pending signal set\nis preserved across an execve(2).\n"
                },
                {
                    "name": "Execution of signal handlers",
                    "content": "Whenever  there is a transition from kernel-mode to user-mode execution (e.g., on return from\na system call or scheduling of a thread onto the CPU), the kernel checks whether there  is  a\npending unblocked signal for which the process has established a signal handler.  If there is\nsuch a pending signal, the following steps occur:\n\n1. The kernel performs the necessary preparatory steps for execution of the signal handler:\n\na) The signal is removed from the set of pending signals.\n\nb) If the signal handler was installed by a call to sigaction(2) that specified the SAON‐‐\nSTACK flag and the thread has defined an alternate signal stack (using sigaltstack(2)),\nthen that stack is installed.\n\nc) Various pieces of signal-related context are saved into a special frame that is created\non the stack.  The saved information includes:\n\n+ the  program  counter register (i.e., the address of the next instruction in the main\nprogram that should be executed when the signal handler returns);\n\n+ architecture-specific register state required for resuming the interrupted program;\n\n+ the thread's current signal mask;\n\n+ the thread's alternate signal stack settings.\n\n(If the signal handler was installed using the sigaction(2) SASIGINFO flag,  then  the\nabove  information  is  accessible  via the ucontextt object that is pointed to by the\nthird argument of the signal handler.)\n\nd) Any signals specified in act->samask when registering the handler with  sigprocmask(2)\nare added to the thread's signal mask.  The signal being delivered is also added to the\nsignal mask, unless SANODEFER was specified when registering the handler.  These  sig‐\nnals are thus blocked while the handler executes.\n\n2. The  kernel  constructs  a frame for the signal handler on the stack.  The kernel sets the\nprogram counter for the thread to point to the first instruction  of  the  signal  handler\nfunction, and configures the return address for that function to point to a piece of user-\nspace code known as the signal trampoline (described in sigreturn(2)).\n\n3. The kernel passes control back to user-space, where execution commences at  the  start  of\nthe signal handler function.\n\n4. When the signal handler returns, control passes to the signal trampoline code.\n\n5. The  signal  trampoline calls sigreturn(2), a system call that uses the information in the\nstack frame created in step 1 to restore the thread to its state before the signal handler\nwas  called.  The thread's signal mask and alternate signal stack settings are restored as\npart of this procedure.  Upon completion of the call to sigreturn(2), the kernel transfers\ncontrol back to user space, and the thread recommences execution at the point where it was\ninterrupted by the signal handler.\n\nNote that if the signal handler does not return (e.g., control is transferred out of the han‐\ndler using siglongjmp(3), or the handler executes a new program with execve(2)), then the fi‐\nnal step is not performed.  In particular, in such scenarios it is the programmer's responsi‐\nbility  to  restore  the state of the signal mask (using sigprocmask(2)), if it is desired to\nunblock the signals that were blocked on entry  to  the  signal  handler.   (Note  that  sig‐‐\nlongjmp(3)  may  or may not restore the signal mask, depending on the savesigs value that was\nspecified in the corresponding call to sigsetjmp(3).)\n\nFrom the kernel's point of view, execution of the signal handler code is exactly the same  as\nthe  execution  of any other user-space code.  That is to say, the kernel does not record any\nspecial state information indicating that the thread is currently excuting  inside  a  signal\nhandler.  All necessary state information is maintained in user-space registers and the user-\nspace stack.  The depth to which nested signal handlers may be invoked is thus  limited  only\nby the user-space stack (and sensible software design!).\n"
                },
                {
                    "name": "Standard signals",
                    "content": "Linux  supports  the standard signals listed below.  The second column of the table indicates\nwhich standard (if any) specified the signal: \"P1990\" indicates that the signal is  described\nin  the  original POSIX.1-1990 standard; \"P2001\" indicates that the signal was added in SUSv2\nand POSIX.1-2001.\n\nSignal      Standard   Action   Comment\n────────────────────────────────────────────────────────────────────────\nSIGABRT      P1990      Core    Abort signal from abort(3)\nSIGALRM      P1990      Term    Timer signal from alarm(2)\nSIGBUS       P2001      Core    Bus error (bad memory access)\nSIGCHLD      P1990      Ign     Child stopped or terminated\nSIGCLD         -        Ign     A synonym for SIGCHLD\nSIGCONT      P1990      Cont    Continue if stopped\nSIGEMT         -        Term    Emulator trap\nSIGFPE       P1990      Core    Floating-point exception\nSIGHUP       P1990      Term    Hangup detected on controlling terminal\nor death of controlling process\nSIGILL       P1990      Core    Illegal Instruction\nSIGINFO        -                A synonym for SIGPWR\nSIGINT       P1990      Term    Interrupt from keyboard\nSIGIO          -        Term    I/O now possible (4.2BSD)\nSIGIOT         -        Core    IOT trap. A synonym for SIGABRT\nSIGKILL      P1990      Term    Kill signal\nSIGLOST        -        Term    File lock lost (unused)\nSIGPIPE      P1990      Term    Broken pipe: write to pipe with no\nreaders; see pipe(7)\nSIGPOLL      P2001      Term    Pollable event (Sys V);\nsynonym for SIGIO\nSIGPROF      P2001      Term    Profiling timer expired\nSIGPWR         -        Term    Power failure (System V)\nSIGQUIT      P1990      Core    Quit from keyboard\nSIGSEGV      P1990      Core    Invalid memory reference\nSIGSTKFLT      -        Term    Stack fault on coprocessor (unused)\nSIGSTOP      P1990      Stop    Stop process\nSIGTSTP      P1990      Stop    Stop typed at terminal\nSIGSYS       P2001      Core    Bad system call (SVr4);\nsee also seccomp(2)\nSIGTERM      P1990      Term    Termination signal\nSIGTRAP      P2001      Core    Trace/breakpoint trap\nSIGTTIN      P1990      Stop    Terminal input for background process\nSIGTTOU      P1990      Stop    Terminal output for background process\nSIGUNUSED      -        Core    Synonymous with SIGSYS\nSIGURG       P2001      Ign     Urgent condition on socket (4.2BSD)\nSIGUSR1      P1990      Term    User-defined signal 1\nSIGUSR2      P1990      Term    User-defined signal 2\nSIGVTALRM    P2001      Term    Virtual alarm clock (4.2BSD)\nSIGXCPU      P2001      Core    CPU time limit exceeded (4.2BSD);\nsee setrlimit(2)\nSIGXFSZ      P2001      Core    File size limit exceeded (4.2BSD);\nsee setrlimit(2)\nSIGWINCH       -        Ign     Window resize signal (4.3BSD, Sun)\n\nThe signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.\n\nUp to and including Linux 2.2, the default behavior for SIGSYS, SIGXCPU, SIGXFSZ, and (on ar‐\nchitectures  other  than  SPARC and MIPS) SIGBUS was to terminate the process (without a core\ndump).  (On some other UNIX systems the default action for SIGXCPU and SIGXFSZ is  to  termi‐\nnate  the  process without a core dump.)  Linux 2.4 conforms to the POSIX.1-2001 requirements\nfor these signals, terminating the process with a core dump.\n\nSIGEMT is not specified in POSIX.1-2001, but nevertheless appears on most other UNIX systems,\nwhere its default action is typically to terminate the process with a core dump.\n\nSIGPWR  (which  is  not  specified  in POSIX.1-2001) is typically ignored by default on those\nother UNIX systems where it appears.\n\nSIGIO (which is not specified in POSIX.1-2001) is ignored by default on  several  other  UNIX\nsystems.\n"
                },
                {
                    "name": "Queueing and delivery semantics for standard signals",
                    "content": "If  multiple  standard  signals are pending for a process, the order in which the signals are\ndelivered is unspecified.\n\nStandard signals do not queue.  If multiple instances of  a  standard  signal  are  generated\nwhile  that signal is blocked, then only one instance of the signal is marked as pending (and\nthe signal will be delivered just once when it is unblocked).  In the case where  a  standard\nsignal  is  already  pending, the siginfot structure (see sigaction(2)) associated with that\nsignal is not overwritten on arrival of subsequent instances of the same signal.   Thus,  the\nprocess will receive the information associated with the first instance of the signal.\n"
                },
                {
                    "name": "Signal numbering for standard signals",
                    "content": "The  numeric  value for each signal is given in the table below.  As shown in the table, many\nsignals have different numeric values on different architectures.  The first numeric value in\neach  table row shows the signal number on x86, ARM, and most other architectures; the second\nvalue is for Alpha and SPARC; the third is for MIPS; and the last is for PARISC.  A dash  (-)\ndenotes that a signal is absent on the corresponding architecture.\n\nSignal        x86/ARM     Alpha/   MIPS   PARISC   Notes\nmost others   SPARC\n─────────────────────────────────────────────────────────────────\nSIGHUP           1           1       1       1\nSIGINT           2           2       2       2\nSIGQUIT          3           3       3       3\nSIGILL           4           4       4       4\nSIGTRAP          5           5       5       5\nSIGABRT          6           6       6       6\nSIGIOT           6           6       6       6\nSIGBUS           7          10      10      10\nSIGEMT           -           7       7      -\nSIGFPE           8           8       8       8\nSIGKILL          9           9       9       9\nSIGUSR1         10          30      16      16\nSIGSEGV         11          11      11      11\nSIGUSR2         12          31      17      17\nSIGPIPE         13          13      13      13\nSIGALRM         14          14      14      14\nSIGTERM         15          15      15      15\nSIGSTKFLT       16          -       -        7\nSIGCHLD         17          20      18      18\nSIGCLD           -          -       18      -\nSIGCONT         18          19      25      26\nSIGSTOP         19          17      23      24\nSIGTSTP         20          18      24      25\nSIGTTIN         21          21      26      27\nSIGTTOU         22          22      27      28\nSIGURG          23          16      21      29\nSIGXCPU         24          24      30      12\nSIGXFSZ         25          25      31      30\nSIGVTALRM       26          26      28      20\nSIGPROF         27          27      29      21\nSIGWINCH        28          28      20      23\nSIGIO           29          23      22      22\nSIGPOLL                                            Same as SIGIO\nSIGPWR          30         29/-     19      19\nSIGINFO          -         29/-     -       -\nSIGLOST          -         -/29     -       -\nSIGSYS          31          12      12      31\nSIGUNUSED       31          -       -       31\n\nNote the following:\n\n*  Where  defined,  SIGUNUSED  is  synonymous with SIGSYS.  Since glibc 2.26, SIGUNUSED is no\nlonger defined on any architecture.\n\n*  Signal 29 is SIGINFO/SIGPWR (synonyms for the same value) on Alpha but SIGLOST on SPARC.\n"
                },
                {
                    "name": "Real-time signals",
                    "content": "Starting with version 2.2, Linux supports real-time signals  as  originally  defined  in  the\nPOSIX.1b  real-time  extensions  (and  now included in POSIX.1-2001).  The range of supported\nreal-time signals is defined by the macros SIGRTMIN and SIGRTMAX.  POSIX.1-2001 requires that\nan implementation support at least POSIXRTSIGMAX (8) real-time signals.\n\nThe Linux kernel supports a range of 33 different real-time signals, numbered 32 to 64.  How‐\never, the glibc POSIX threads implementation internally uses two (for  NPTL)  or  three  (for\nLinuxThreads) real-time signals (see pthreads(7)), and adjusts the value of SIGRTMIN suitably\n(to 34 or 35).  Because the range of available real-time  signals  varies  according  to  the\nglibc  threading  implementation  (and  this variation can occur at run time according to the\navailable kernel and glibc), and indeed the range of real-time  signals  varies  across  UNIX\nsystems,  programs  should never refer to real-time signals using hard-coded numbers, but in‐\nstead should always refer to real-time signals using the  notation  SIGRTMIN+n,  and  include\nsuitable (run-time) checks that SIGRTMIN+n does not exceed SIGRTMAX.\n\nUnlike  standard  signals,  real-time  signals have no predefined meanings: the entire set of\nreal-time signals can be used for application-defined purposes.\n\nThe default action for an unhandled real-time signal is to terminate the receiving process.\n\nReal-time signals are distinguished by the following:\n\n1.  Multiple instances of real-time signals can be queued.   By  contrast,  if  multiple  in‐\nstances  of  a standard signal are delivered while that signal is currently blocked, then\nonly one instance is queued.\n\n2.  If the signal is sent using sigqueue(3), an accompanying value (either an  integer  or  a\npointer) can be sent with the signal.  If the receiving process establishes a handler for\nthis signal using the SASIGINFO flag to sigaction(2), then it can obtain this  data  via\nthe  sivalue  field of the siginfot structure passed as the second argument to the han‐\ndler.  Furthermore, the sipid and siuid fields of this structure can be used to  obtain\nthe PID and real user ID of the process sending the signal.\n\n3.  Real-time signals are delivered in a guaranteed order.  Multiple real-time signals of the\nsame type are delivered in the order they were sent.  If different real-time signals  are\nsent  to  a process, they are delivered starting with the lowest-numbered signal.  (I.e.,\nlow-numbered signals have highest priority.)  By contrast, if multiple  standard  signals\nare pending for a process, the order in which they are delivered is unspecified.\n\nIf both standard and real-time signals are pending for a process, POSIX leaves it unspecified\nwhich is delivered first.  Linux, like many other implementations, gives priority to standard\nsignals in this case.\n\nAccording  to  POSIX, an implementation should permit at least POSIXSIGQUEUEMAX (32) real-\ntime signals to be queued to a process.  However, Linux does things differently.  In  kernels\nup  to  and  including 2.6.7, Linux imposes a system-wide limit on the number of queued real-\ntime signals for all processes.  This limit can be viewed and (with  privilege)  changed  via\nthe  /proc/sys/kernel/rtsig-max file.  A related file, /proc/sys/kernel/rtsig-nr, can be used\nto find out how many real-time signals are currently queued.  In Linux 2.6.8, these /proc in‐\nterfaces  were  replaced  by the RLIMITSIGPENDING resource limit, which specifies a per-user\nlimit for queued signals; see setrlimit(2) for further details.\n\nThe addition of  real-time  signals  required  the  widening  of  the  signal  set  structure\n(sigsett)  from  32  to  64 bits.  Consequently, various system calls were superseded by new\nsystem calls that supported the larger signal sets.  The old and new system calls are as fol‐\nlows:\n"
                },
                {
                    "name": "Linux 2.0 and earlier   Linux 2.2 and later",
                    "content": "sigaction(2)            rtsigaction(2)\nsigpending(2)           rtsigpending(2)\nsigprocmask(2)          rtsigprocmask(2)\nsigreturn(2)            rtsigreturn(2)\nsigsuspend(2)           rtsigsuspend(2)\nsigtimedwait(2)         rtsigtimedwait(2)\n"
                },
                {
                    "name": "Interruption of system calls and library functions by signal handlers",
                    "content": "If  a signal handler is invoked while a system call or library function call is blocked, then\neither:\n\n* the call is automatically restarted after the signal handler returns; or\n\n* the call fails with the error EINTR.\n\nWhich of these two behaviors occurs depends on the interface and whether or  not  the  signal\nhandler  was  established  using  the  SARESTART  flag (see sigaction(2)).  The details vary\nacross UNIX systems; below, the details for Linux.\n\nIf a blocked call to one of the following interfaces is interrupted by a signal handler, then\nthe  call  is automatically restarted after the signal handler returns if the SARESTART flag\nwas used; otherwise the call fails with the error EINTR:\n\n* read(2), readv(2), write(2), writev(2), and ioctl(2) calls on \"slow\" devices.  A \"slow\" de‐\nvice  is  one where the I/O call may block for an indefinite time, for example, a terminal,\npipe, or socket.  If an I/O call on a slow device has already transferred some data by  the\ntime  it  is  interrupted  by  a signal handler, then the call will return a success status\n(normally, the number of bytes transferred).  Note that a (local) disk is not a slow device\naccording  to  this  definition; I/O operations on disk devices are not interrupted by sig‐\nnals.\n\n* open(2), if it can block (e.g., when opening a FIFO; see fifo(7)).\n\n* wait(2), wait3(2), wait4(2), waitid(2), and waitpid(2).\n\n* Socket interfaces: accept(2), connect(2), recv(2),  recvfrom(2),  recvmmsg(2),  recvmsg(2),\nsend(2),  sendto(2),  and  sendmsg(2), unless a timeout has been set on the socket (see be‐\nlow).\n\n* File locking interfaces: flock(2) and the FSETLKW and FOFDSETLKW operations of fcntl(2)\n\n* POSIX  message  queue  interfaces:  mqreceive(3),  mqtimedreceive(3),   mqsend(3),   and\nmqtimedsend(3).\n\n* futex(2) FUTEXWAIT (since Linux 2.6.22; beforehand, always failed with EINTR).\n\n* getrandom(2).\n\n* pthreadmutexlock(3), pthreadcondwait(3), and related APIs.\n\n* futex(2) FUTEXWAITBITSET.\n\n* POSIX  semaphore  interfaces: semwait(3) and semtimedwait(3) (since Linux 2.6.22; before‐\nhand, always failed with EINTR).\n\n* read(2) from an inotify(7) file descriptor (since Linux 3.8; beforehand, always failed with\nEINTR).\n\nThe following interfaces are never restarted after being interrupted by a signal handler, re‐\ngardless of the use of SARESTART; they always fail with the error EINTR when interrupted  by\na signal handler:\n\n* \"Input\"  socket  interfaces,  when a timeout (SORCVTIMEO) has been set on the socket using\nsetsockopt(2): accept(2), recv(2), recvfrom(2), recvmmsg(2) (also with a  non-NULL  timeout\nargument), and recvmsg(2).\n\n* \"Output\"  socket  interfaces, when a timeout (SORCVTIMEO) has been set on the socket using\nsetsockopt(2): connect(2), send(2), sendto(2), and sendmsg(2).\n\n* Interfaces used to wait for signals: pause(2), sigsuspend(2), sigtimedwait(2), and sigwait‐‐\ninfo(2).\n\n* File  descriptor multiplexing interfaces: epollwait(2), epollpwait(2), poll(2), ppoll(2),\nselect(2), and pselect(2).\n\n* System V IPC interfaces: msgrcv(2), msgsnd(2), semop(2), and semtimedop(2).\n\n* Sleep interfaces: clocknanosleep(2), nanosleep(2), and usleep(3).\n\n* iogetevents(2).\n\nThe sleep(3) function is also never restarted if interrupted by a handler, but gives  a  suc‐\ncess return: the number of seconds remaining to sleep.\n"
                },
                {
                    "name": "Interruption of system calls and library functions by stop signals",
                    "content": "On  Linux,  even in the absence of signal handlers, certain blocking interfaces can fail with\nthe error EINTR after the process is stopped by one of the stop signals and then resumed  via\nSIGCONT.  This behavior is not sanctioned by POSIX.1, and doesn't occur on other systems.\n\nThe Linux interfaces that display this behavior are:\n\n* \"Input\"  socket  interfaces,  when a timeout (SORCVTIMEO) has been set on the socket using\nsetsockopt(2): accept(2), recv(2), recvfrom(2), recvmmsg(2) (also with a  non-NULL  timeout\nargument), and recvmsg(2).\n\n* \"Output\"  socket  interfaces, when a timeout (SORCVTIMEO) has been set on the socket using\nsetsockopt(2): connect(2), send(2), sendto(2), and sendmsg(2), if a send  timeout  (SOSND‐‐\nTIMEO) has been set.\n\n* epollwait(2), epollpwait(2).\n\n* semop(2), semtimedop(2).\n\n* sigtimedwait(2), sigwaitinfo(2).\n\n* Linux 3.7 and earlier: read(2) from an inotify(7) file descriptor\n\n* Linux 2.6.21 and earlier: futex(2) FUTEXWAIT, semtimedwait(3), semwait(3).\n\n* Linux 2.6.8 and earlier: msgrcv(2), msgsnd(2).\n\n* Linux 2.4 and earlier: nanosleep(2).\n"
                }
            ]
        },
        "CONFORMING TO": {
            "content": "POSIX.1, except as noted.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "For a discussion of async-signal-safe functions, see signal-safety(7).\n\nThe  /proc/[pid]/task/[tid]/status  file contains various fields that show the signals that a\nthread is blocking (SigBlk), catching (SigCgt), or ignoring (SigIgn).  (The  set  of  signals\nthat  are  caught or ignored will be the same across all threads in a process.)  Other fields\nshow the set of pending signals that are directed to the thread (SigPnd) as well as  the  set\nof  pending  signals that are directed to the process as a whole (ShdPnd).  The corresponding\nfields in /proc/[pid]/status show the information for the main thread.  See proc(5) for  fur‐\nther details.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "There are six signals that can be delivered as a consequence of a hardware exception: SIGBUS,\nSIGEMT, SIGFPE, SIGILL, SIGSEGV, and SIGTRAP.  Which of these signals is delivered,  for  any\ngiven hardware exception, is not documented and does not always make sense.\n\nFor example, an invalid memory access that causes delivery of SIGSEGV on one CPU architecture\nmay cause delivery of SIGBUS on another architecture, or vice versa.\n\nFor another example, using the x86 int instruction with  a  forbidden  argument  (any  number\nother  than  3  or 128) causes delivery of SIGSEGV, even though SIGILL would make more sense,\nbecause of how the CPU reports the forbidden operation to the kernel.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "kill(1),   clone(2),   getrlimit(2),   kill(2),   pidfdsendsignal(2),   restartsyscall(2),\nrtsigqueueinfo(2),  setitimer(2),  setrlimit(2),  sgetmask(2), sigaction(2), sigaltstack(2),\nsignal(2), signalfd(2), sigpending(2), sigprocmask(2), sigreturn(2), sigsuspend(2),  sigwait‐‐\ninfo(2),  abort(3),  bsdsignal(3),  killpg(3),  longjmp(3),  pthreadsigqueue(3),  raise(3),\nsigqueue(3), sigset(3), sigsetops(3), sigvec(3),  sigwait(3),  strsignal(3),  swapcontext(3),\nsysvsignal(3), core(5), proc(5), nptl(7), pthreads(7), sigevent(7)\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This  page  is  part  of  release  5.10 of the Linux man-pages project.  A description of the\nproject, information about reporting bugs, and the latest version of this page, can be  found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-12-21                                    SIGNAL(7)",
            "subsections": []
        }
    },
    "summary": "signal - overview of signals",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "kill",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/kill/1/json"
        },
        {
            "name": "clone",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/clone/2/json"
        },
        {
            "name": "getrlimit",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/getrlimit/2/json"
        },
        {
            "name": "kill",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/kill/2/json"
        },
        {
            "name": "pidfdsendsignal",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/pidfdsendsignal/2/json"
        },
        {
            "name": "restartsyscall",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/restartsyscall/2/json"
        },
        {
            "name": "rtsigqueueinfo",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/rtsigqueueinfo/2/json"
        },
        {
            "name": "setitimer",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/setitimer/2/json"
        },
        {
            "name": "setrlimit",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/setrlimit/2/json"
        },
        {
            "name": "sgetmask",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sgetmask/2/json"
        },
        {
            "name": "sigaction",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sigaction/2/json"
        },
        {
            "name": "sigaltstack",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sigaltstack/2/json"
        },
        {
            "name": "signalfd",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/signalfd/2/json"
        },
        {
            "name": "sigpending",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sigpending/2/json"
        },
        {
            "name": "sigprocmask",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sigprocmask/2/json"
        },
        {
            "name": "sigreturn",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sigreturn/2/json"
        },
        {
            "name": "sigsuspend",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sigsuspend/2/json"
        },
        {
            "name": "info",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/info/2/json"
        },
        {
            "name": "abort",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/abort/3/json"
        },
        {
            "name": "bsdsignal",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/bsdsignal/3/json"
        },
        {
            "name": "killpg",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/killpg/3/json"
        },
        {
            "name": "longjmp",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/longjmp/3/json"
        },
        {
            "name": "pthreadsigqueue",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/pthreadsigqueue/3/json"
        },
        {
            "name": "raise",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/raise/3/json"
        },
        {
            "name": "sigqueue",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sigqueue/3/json"
        },
        {
            "name": "sigset",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sigset/3/json"
        },
        {
            "name": "sigsetops",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sigsetops/3/json"
        },
        {
            "name": "sigvec",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sigvec/3/json"
        },
        {
            "name": "sigwait",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sigwait/3/json"
        },
        {
            "name": "strsignal",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/strsignal/3/json"
        },
        {
            "name": "swapcontext",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/swapcontext/3/json"
        },
        {
            "name": "sysvsignal",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sysvsignal/3/json"
        },
        {
            "name": "core",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/core/5/json"
        },
        {
            "name": "proc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
        },
        {
            "name": "nptl",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/nptl/7/json"
        },
        {
            "name": "pthreads",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pthreads/7/json"
        },
        {
            "name": "sigevent",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/sigevent/7/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Simplified software signal facilities.",
        "examples": [
            {
                "description": "View documentation for signals in macOS",
                "command": "man signal"
            }
        ]
    }
}