Signals
Explore how signals in C allow communication between the operating system and running programs in Linux. Learn to handle signals like SIGINT, customize signal handlers, and manage processes using commands such as ps and kill.
A program is nothing without communication. The fork() system call is used to duplicate the process. This is done by communicating with the Operating System. Similarly, we can use the methodology, known as signal, to achieve communication from the Operating System to the program.
Uncustomized signal handling
Example program
📝 Note: RUN the code given below and press
Ctrl+Cto stop the infinite program. You have to wait for ...