hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

README (782B)


      1 The signal module provides support for Unix signal handlers. Typical
      2 applications will provide a signal handler to [[handle]] to configure it for the
      3 desired signal, possibly along with flags and a signal mask. This function
      4 returns the previous signal handler, which can be passed to [[restore]] to
      5 restore the previous behavior.
      6 
      7 Signal handling is stupidly complicated and easy to get wrong. The standard
      8 library makes little effort to help you deal with this. Consult your local man
      9 pages, particularly signal-safety(7) on Linux, and perhaps a local priest as
     10 well. We advise you to get out of the signal handler as soon as possible, for
     11 example via the "self-pipe trick".
     12 
     13 Note that the necessary sa_restorer functionality is implemented (and imposed)
     14 by the standard library.