Catching sys.exit
<p>Hi to all =)
I've a little curiosity
If I've the following function, that close the program calling sys.exit:</p>

<pre><code>void stop(int state){
    std::exit(state);
}
</code></pre>

<p>Now, I want to call this function, but without exit the program.
So, I want to "catch" the std::exit command... is there a method to do it?</p>
