Maintain a job table in ShellCtx that tracks all background jobs.
Job table should store:
- Job number
- PID
- Status (
Running, Stopped, Done)
- Original command string
Behavior:
jobs displays the job table
- When a background job completes, notify user before next prompt:
[1]+ Done sleep 5
- Use
waitpid with WNOHANG to poll without blocking
Acceptance criteria:
Maintain a job table in
ShellCtxthat tracks all background jobs.Job table should store:
Running,Stopped,Done)Behavior:
jobsdisplays the job table[1]+ Done sleep 5waitpidwithWNOHANGto poll without blockingAcceptance criteria:
jobsdisplays correct status