How to change the meaning of SIGTERM in C programme : I've recently have a problem with signals. I'd like to write a program in C which would print anything after the signal is send to the process. For egzample: I'm sending SIGTERM for my process (which is simply running programme) , and the programme prints out for egzample "killing the process denied" instead of killing the process. So how to do that? How to force process to catch and change the meaning of such signal. Also I have a question if there is any possibility to kill init process (I know it's kind of stiupid question , but I was wondering how linux is dealing with such signal, and how would it technically look like if I type :"sudo kill -9 1")