title: Explicitly invoke SIG_DFL/SIG_IGN handlers on Linux
body: <p>I've blocked, and then waited for a signal via the following code:</p>
  
  <pre><code>sigset_t set;
  sigfillset(&amp;set); // all signals
  sigprocmask(SIG_SETMASK, &amp;set, NULL); // block all signals
  siginfo_t info;
  int signum = sigwaitinfo(&amp;set, &amp;info); // wait for next signal
  struct sigaction act;
  sigaction(signum, NULL, &amp;act); // get the current handler for the signal
  act.sa_handler(signum); // invoke it
  </code></pre>
  
  <p>The last line generates a segmentation fault, as the handler is set to <code>SIG_DFL</code> (defined as <code>0</code>). How can I manually invoke the default handler if it's set to <code>SIG_DFL</code> or <code>SIG_IGN</code>? Also note that <code>SIG_IGN</code> is defined as <code>1</code>.</p>