The signal function directs the occurrence of the signal to any of the following signal handlers:
- SIG_IGN: This will result in the signal being ignored.
- SIG_DFL: This will result in invoking the default action that is associated with the raised signal.
- user_defined_function: This will result in the invoking of the user-defined function when the signal is raised.
Now, let's begin with the recipe.