back to labs
Process Signals
MediumLinux+ Exam Prep20-25 minThe brief
Write a script at /root/case/graceful.sh that demonstrates graceful shutdown with signals. It should install a trap that catches SIGTERM and cleans up, start a background worker, then send that worker the graceful termination signal (SIGTERM, not SIGKILL) and wait for it. The script must exit cleanly (status 0). Make it executable. Grading traces the run and checks that a TERM trap was really installed and that kill really sent SIGTERM.
What you'll do
- Create an executable script at /root/case/graceful.sh
- Trap SIGTERM to run a cleanup handler
- Send a background process the graceful termination signal
- Exit cleanly
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
