Module signal::trap [] [src]

Trap for handling signals synchronously

It works as follows:

  1. You create a trap (Trap::trap()), that is RAII-style guard that masks out signals and unignores them, preparing them for be handled when user wants
  2. Use trap as iterator yielding signals or trap.wait(timeout)

Especially useful for running (multiple) child processes simultaneously.

Structs

Trap

A RAII guard for masking out signals and waiting for them synchronously