4.4 Signals

Ironclad implements standard POSIX signals for use between processes. The supported signals with their corresponding values are:

  1. SIGHUP
  2. SIGINT
  3. SIGQUIT
  4. SIGCONT
  5. SIGBUS
  6. SIGABRT
  7. SIGCHLD
  8. SIGFPE
  9. SIGKILL
  10. SIGILL
  11. SIGPIPE
  12. SIGSEGV
  13. SIGSTOP
  14. SIGALRM
  15. SIGTERM
  16. SIGTSTP
  17. SIGTTIN
  18. SIGTTOU
  19. SIGUSR1
  20. SIGUSR2
  21. SIGPOLL
  22. SIGPROF
  23. SIGSYS
  24. SIGTRAP
  25. SIGURG
  26. SIGVTALRM
  27. SIGXCPU
  28. SIGXFSZ
  29. SIGWINCH
  30. SIGPWR

A Linux-like signal model is provided, where the kernel takes care of signal dispatching and registering, and the only thing userland has to do in particular to support signal control flow transfer is using sa_restorer and signal_return syscalls, in a construct as such:

void restorer(void) {
    // Do whatever on signal end.
    signal_return();
    // Handle error, usually just panic.
    __builtin_unreachable();
}

In a normal desktop system, this will be implemented by the libc or similar layer, but this is something to keep in mind when working without those abstractions. sigaction, signal_return.