title: How to Handle SIGABRT signal?
body: <p>Here is the code on which I set my handler for <code>SIGABRT</code> signal then I call <code>abort()</code> but handler does not get trigered, instead program gets aborted, why?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;csignal&gt;
  using namespace std;
  void Triger(int x)
  {
      cout &lt;&lt; "Function triger" &lt;&lt; endl;
  }
  
  int main()
  {
      signal(SIGABRT, Triger);
      abort();
      cin.ignore();
      return 0;
  }
  </code></pre>
  
  <p><strong>PROGRAM OUTPUT:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/o9PRQ.png" alt="enter image description here"></p>