title: How to exit with SIGSEGV instead of SIGABRT?
body: <p>I am learning how to cause <em>Buffer Overflows</em> with this code.
  Then I am running this with <strong>GDB</strong> and when I input bad data that causes the smashing of the Stack I exit with 
  <code>Program received signal SIGABRT, Aborted.
  0x00007ffff7a4af79 in __GI_raise (sig=sig@entry=6)
      at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.</code>
  but the the both guide I am reading exits with <code>SIGSEGV</code> or <code>EXC_BAD_ACCESS</code> with the reason (in the last case) <code>KERN_INVALID_ADDRESS</code> and the address that actually are the bad input.</p>
  
  <p>How do I exit with those Signals? Is it my system that is configured to work that way? </p>
  
  <p>I am running on <code>Ubuntu 14.04 LTS Trusty</code></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  int test(char *test) {
      char buf[10];
      strcpy(buf, test);
  
      return 0;
  }
  
  int main(int argc, char *argv[]) {
      test(argv[1]);
      printf("After test: %s\n", argv[1]);
  
      return 0;
  }
  </code></pre>