back to labs
Background Processes
MediumCommand Line Guru20-25 minThe brief
A long task shouldn't block the rest of a script. Write a script at /root/case/background.sh that starts a worker in the background, captures its process ID, does other work meanwhile, then waits for the worker to finish before exiting. The script must be executable and exit cleanly (status 0). Grading traces the run and checks that it really waits on the captured worker PID.
What you'll do
- Create an executable script at /root/case/background.sh
- Launch a task in the background and capture its PID
- Wait for the background task before exiting
- Exit cleanly
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
