Describe the default actions associated with signals in Linux. What are some common default actions that a signal can trigger if no custom signal handler is set up?
Each signal has a default action associated with it, such as terminating the process, which is taken if no other action is specified. Some common default actions triggered by a signal are:-
User Interruptions: The user can interrupt the process by pressing ctrl+C, ctrl+Z, ctrl+\, this will cause them to stop.
Process Control: One process can control other by sending signals. For e.g. the parent process can send the child process a SIGKILL if the child process is getting out of control.
Timers: Processes can set timers to perform actions at specific intervals. When the timer expires a SIGALRM signal is sent to the process which can then handle it to execute the desired action.