title: Handling segfault signal SIGSEGV need to determine the cause of segfault using siginfo_t
body: <p>I'm making a wrapper for the pthread library that allows each thread to have its own set of non-shared memory. Right now the way c is set up if any thread tries to rwe another threads data, the program segfaults. This is fine, I can catch it with a sighandler and call <code>pthread_exit()</code> and continue on with the program.</p>
  
  <p>But not every segfault is going to be the result of a bad rwe. I need to find a way to use the siginfo type to determine if the segfault was bad programming or this error. Any ideas?</p>
  
  <p>Since I am using mmap to manage the memory pages I think using <code>si_addr</code> in <code>siginfo</code> will help me out.</p>