i am using centos and and i wrote a c program to restart the process whenever the process is killed with SIGSEGV & SIGALRM but i am able to that for only once when ever i am trying to kill for the second time it is not killing the process
crashlog("caught the sigsegv signal");
system("service process restart");
release_resourses();
kill(getpid(), sig);
in release resources i am removing the ips form network
crashlog("caught the sigsegv signal");
system("service process restart");
release_resourses();
kill(getpid(), sig);
in release resources i am removing the ips form network