is it possible to unregister an exit handler function???
void exit_handler_1()
{
printf("in first exit handler\n");
}
int main()
{
if(atexit(exit_handler_1())
{
perror("error");
}
return 0;
}
It is not possible.
Why not just register one atexit
function and have a global variable for that function to be able to decide what is required of it.