Complete the code to catch the SIGINT signal and run the cleanup function.
trap cleanup [1]The trap command catches signals. SIGINT is the interrupt signal sent by Ctrl+C.
Complete the code to ignore the SIGTERM signal.
trap '' [1]
Using trap '' SIGTERM tells the script to ignore the termination signal.
Fix the error in the trap command to correctly catch SIGQUIT and run the quit_handler function.
trap [1] SIGQUITThe trap command expects the function name without parentheses or extra characters.
Fill both blanks to run cleanup on SIGINT and SIGTERM signals.
trap cleanup [1] [2]
Both SIGINT and SIGTERM are common signals to stop a script. Trap them to run cleanup.
Fill all three blanks to create a trap that runs handle_exit on EXIT and SIGINT.
trap [1] [2] [3]
The trap command syntax is: trap function signal1 signal2 .... Here, handle_exit runs on EXIT and SIGINT.