- in an interactive shell every pipeline runs in its own process group
and gets the terminal while it runs in the foreground
- Ctrl+Z stops the foreground job, command & starts a job in the
background; finished and stopped jobs are reported before the prompt
- new builtins jobs, fg, bg and wait (wait also works without job
control, e.g. in scripts, where background jobs read from /dev/null)
- terminal modes are saved and restored when a job stops or continues
- exit and Ctrl+D warn once if there are stopped jobs
- processes are waited for with wait4 (WUNTRACED) instead of exec.Cmd.Wait
- pty based test for job control (Linux)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>