LESSON 1.12 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Processes, signals and environment variables
Watch a process copy itself, swap its program, and get a signal.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 1.12 · PROCESS BAY1 PROCESS · 1 THREAD · MODE IN ENV
01
Stage 1 of 6 · Set MODE
demo.py runs as a process with PID 5718. os.environ adds MODE=fast to its env.
Explain it simply
The shell started demo.py as process 5718, with its own memory. Next to the memory sits the env: a short list of settings, like notes that say NAME=value. os.environ adds MODE=fast to that list, so programs started from here can read it.
The shell, PID 5690, started demo.py as process 5718 with one thread. Its env holds HOME, PATH and MODE=fast.
process and threadmemory and envPID, parent link, handlersignal, warning, endoutput and exit code
Toy: 3 processes · Linux rules · PIDs are stand-ins · only the names used here are drawn
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A process has a PID, its own memory, an env and threads.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.