lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

index.md (714B)


      1 +++
      2 title = 'Signal handling'
      3 +++
      4 # Signal handling
      5 types:
      6 
      7 - hardware-induced (e.g SIGILL)
      8 - software-induced (e.g SIGQUIT, SIGPIPE)
      9 
     10 actions (responses):
     11 
     12 - Term (terminate), Ign (ignore), Core (terminate execution & OS core dump), Stop (stop execution, freeze process), Cont (continue, unfreeze processs)
     13 - Default action on per-signal basis, which is typically overridable (but some aren't, like SIGKILL)
     14 - signals can typically be blocked and actions delayed (but again, some exceptions)
     15 
     16 catching signals:
     17 
     18 - process registers signal handler
     19 - OS delivers signal, allows process to run handler
     20 - current execution context has to be saved/restored
     21 
     22 diagram example:
     23 
     24 ![](039ab127aa97667446c4b511855273ca.png)