Unix Signals

2025-07-27   programmingconcept sketch


linux-signals--archived
# Signal      Default     Comment                              POSIX
  Name        Action

 1 SIGHUP     Terminate   Hang up controlling terminal or      Yes
                          process 
 2 SIGINT     Terminate   Interrupt from keyboard, Control-C   Yes
 3 SIGQUIT    Dump        Quit from keyboard, Control-\        Yes
 4 SIGILL     Dump        Illegal instruction                  Yes
 5 SIGTRAP    Dump        Breakpoint for debugging             No
 6 SIGABRT    Dump        Abnormal termination                 Yes
 6 SIGIOT     Dump        Equivalent to SIGABRT                No
 7 SIGBUS     Dump        Bus error                            No
 8 SIGFPE     Dump        Floating-point exception             Yes
 9 SIGKILL    Terminate   Forced-process termination           Yes
10 SIGUSR1    Terminate   Available to processes               Yes
11 SIGSEGV    Dump        Invalid memory reference             Yes
12 SIGUSR2    Terminate   Available to processes               Yes
13 SIGPIPE    Terminate   Write to pipe with no readers        Yes
14 SIGALRM    Terminate   Real-timer clock                     Yes
15 SIGTERM    Terminate   Process termination                  Yes
16 SIGSTKFLT  Terminate   Coprocessor stack error              No
17 SIGCHLD    Ignore      Child process stopped or terminated  Yes
                          or got a signal if traced 
18 SIGCONT    Continue    Resume execution, if stopped         Yes
19 SIGSTOP    Stop        Stop process execution, Ctrl-Z       Yes
20 SIGTSTP    Stop        Stop process issued from tty         Yes
21 SIGTTIN    Stop        Background process requires input    Yes
22 SIGTTOU    Stop        Background process requires output   Yes
23 SIGURG     Ignore      Urgent condition on socket           No
24 SIGXCPU    Dump        CPU time limit exceeded              No
25 SIGXFSZ    Dump        File size limit exceeded             No
26 SIGVTALRM  Terminate   Virtual timer clock                  No
27 SIGPROF    Terminate   Profile timer clock                  No
28 SIGWINCH   Ignore      Window resizing                      No
29 SIGIO      Terminate   I/O now possible                     No
29 SIGPOLL    Terminate   Equivalent to SIGIO                  No
30 SIGPWR     Terminate   Power supply failure                 No
31 SIGSYS     Dump        Bad system call                      No
31 SIGUNUSED  Dump        Equivalent to SIGSYS                 No

^da7611


Introduction To Unix Signals Programming

POSIX signals

signal(7) - Linux manual page

Unix Signals Blog


https://en.wikipedia.org/wiki/Category:Unix_signals

https://wiki.c2.com/?GrossDeficienciesOfUnix


Unix Signals:

  • Definition: Asynchronous notifications sent to a process to signal an event or interrupt.

  • Types:

    • Synchronous (e.g., division by zero)

    • Asynchronous (e.g., keyboard interrupt, Ctrl+C)

  • Handling:

    • Signal handlers: User-defined functions to handle signals.

    • Default actions: Predefined actions (e.g., terminate, ignore, or continue).

    • Blocking: Temporarily ignoring signals.

  • Key signals:

    • SIGINT (interrupt)

    • SIGTERM (termination request)

    • SIGKILL (forced termination)

    • SIGALRM (timer expiration)

  • Sending signals:

    • kill command

    • raise function (from within a process)

    • sigqueue function (for real-time signals)

  • Important aspects:

    • Signals are not queued; if a signal is sent while a process is handling another signal, it may be lost.

    • Signals can be used for inter-process communication (IPC).

    • Signal handlers should be concise and avoid complex operations to prevent deadlocks or other issues.


Domain (AI Generated)

Operating System Internals or Computer Systems Programming.


World-class best people (AI Generated)

Some notable experts on Unix signals include:


  1. Richard Stevens - Author of "Advanced Programming in the UNIX Environment"

  2. W. Richard Stevens - Author of "UNIX Network Programming"

  3. Eric Raymond - Author of "The Art of UNIX Programming"

  4. Michael Kerrisk - Author of "The Linux Programming Interface"

  5. Rob Pike - Co-designer of the Plan 9 operating system and expert on Unix-like systems.

Internet Resources

Hackernews

  • Should you be scared of Unix signals? (2016) hn ref Should you be scared of Unix signals?

    • 257 points, 155 comments
  • The evolving Unix attitudes on handling signals in your code hn ref

    • 77 points, 31 comments
  • Should you be scared of Unix signals? hn ref

    • 155 points, 82 comments

Lesswrong

  • Siren worlds and the perils of over-optimised search lw

  • Conjecture: A Roadmap for Cognitive Software and ... lw

  • Plausibly Factoring Conjectures lw


Lobsters


PeruserAI, ChatGPT, Claude


Wikipedia, Github, Stack Overflow, Quora, Reddit


Google, Youtube, Google Images, Google Scholar




Incoming Internal References (0)


Outgoing Web References (34)
  1. www.cs.kent.edu/~ruttan/sysprog/lectures/signals.html
    • Introduction To Unix Signals Programming
  2. dsa.cs.tsinghua.edu.cn/oj/static/unix_signal.html
    • POSIX signals
  3. man7.org/linux/man-pages/man7/signal.7.html
    • signal(7) - Linux manual page
  4. venam.net/blog/unix/2016/10/21/unix-signals.html
    • Unix Signals Blog
  5. en.wikipedia.org/wiki/Category:Unix_signals
    • https://en.wikipedia.org/wiki/Category:Unix_signals
  6. wiki.c2.com/?GrossDeficienciesOfUnix
    • https://wiki.c2.com/?GrossDeficienciesOfUnix
  7. www.google.com/search?q=site%3Anews.ycombinator.com+Unix%20signals
    • Hackernews
  8. news.ycombinator.com/item?id=37899098
    • hn
  9. jvns.ca/blog/2016/06/13/should-you-be-scared-of-signals
    • ref
  10. jvns.ca/blog/2016/06/13/should-you-be-scared-of-signals
    • Should you be scared of Unix signals?
  11. news.ycombinator.com/item?id=36569526
    • hn
  12. utcc.utoronto.ca/~cks/space/blog/unix/SignalHandlingOverTime
    • ref
  13. news.ycombinator.com/item?id=11898034
    • hn
  14. jvns.ca/blog/2016/06/13/should-you-be-scared-of-signals
    • ref
  15. www.google.com/search?q=site%3Awww.lesswrong.com+Unix%20signals
    • Lesswrong
  16. www.lesswrong.com/posts/nFv2buafNc9jSaxAH/siren-worlds-and-the-perils-of-over-optimised-search
    • lw
  17. www.lesswrong.com/posts/H26ndkABmGvoc9PTC/conjecture-a-roadmap-for-cognitive-software-and-a-humanist
    • lw
  18. www.lesswrong.com/posts/LYQ2C87DsB4qxwc6a/plausibly-factoring-conjectures
    • lw
  19. www.google.com/search?q=site%3Alobste.rs+Unix%20signals
    • Lobsters
  20. lobste.rs/s/m9bhxk/beyond_ctrl_c_dark_corners_unix_signal
    • lobste.rs
  21. lobste.rs/s/wd6tjx/how_old_various_unix_signals_are
    • lobste.rs
  22. lobste.rs/s/bi29lp/why_programmers_can_t_stop_programs_with
    • lobste.rs
  23. eruser.ai/search?q=Unix%20signals
    • PeruserAI
  24. chat.openai.com/chat?q=Unix%20signals
    • ChatGPT
  25. claude.ai/new?q=Unix%20signals
    • Claude
  26. www.google.com/search?q=site%3Aen.wikipedia.org+Unix%20signals
    • Wikipedia
  27. www.google.com/search?q=site%3Agithub.com+Unix%20signals
    • Github
  28. www.google.com/search?q=site%3Astackoverflow.com+Unix%20signals
    • Stack Overflow
  29. www.google.com/search?q=site%3Aquora.com+Unix%20signals
    • Quora
  30. www.google.com/search?q=site%3Areddit.com+Unix%20signals
    • Reddit
  31. www.google.com/search?q=Unix%20signals
    • Google
  32. www.youtube.com/results?search_query=Unix%20signals
    • Youtube
  33. www.google.com/search?tbm=isch&q=Unix%20signals
    • Google Images
  34. cholar.google.com/scholar?q=Unix%20signals
    • Google Scholar

Receive my updates

Barış Özmen © 2025