This code can't be executed. Signal is sent to the function via signal, but the code inside the function is not running.
void my_sigtrap(int sig) {
    LOGD("mtf----   why not working  ");
} 
void test_signal() {//SIGTRAP
    signal(SIGTRAP, my_sigtrap);
}
why my_sigtrap function not working?
 
    