Advanced · Module 6 · Lesson 10 of 10
Terminals, Sessions, and Job Control
Understand controlling terminals, process groups, and foreground signals well enough to build shell-like process supervision.
Pro — members onlyAbout 15 minutes
By the end you can
- Distinguish a terminal, session, and process group
- Explain foreground and background job behavior
- Use terminal-related signals safely
- Identify when a program should avoid terminal assumptions
Builds on Process Environments, Resource Limits, and Daemon Startup, Signal Architecture and Delivery with sigaction.
01 · A question first
Why does pressing Ctrl-C usually stop the whole foreground pipeline rather than only the command that reads from the terminal?
Make a guess before you read on.
02 · The idea
Members only
Unlock the full lesson
This lesson is part of the membership. Join to read it in full, along with every other premium deep dive.
What's inside
- Start with the problem
- Three related objects
- Signals from terminal input
- Pseudo-terminals
- Detect terminal assumptions
- What it costs
- Pitfalls and variations
- Where it is used
Something wrong with this lesson? Report a problem