title: Is there a way to block only asynchronous delivery of SIGSEGV or to find out the delivery mode?
body: <p>In a C/C++ program, I am using <code>mprotect</code> together with an installed signal handler for SIGSEGV (using GNU libsigsegv) to implement write barriers (for generational GC). The memory protection fault signal is delivered synchronously by the kernel when the write barrier is hit.</p>
  <p>In order to be sure that the signal handler is always being called synchronously (otherwise my code could deadlock), I would like to block asynchronous delivery of the SIGSEGV signal (e.g. through <code>kill (2)</code>). Is there a way to do this? Or is there a way for the signal handler to find out whether the signal was delivered synchronously?</p>