metaphor embodied-experience containerforcematching preventcause boundary specific

Process Trap

metaphor dead

Source: Embodied ExperienceComputing

Categories: computer-sciencelinguistics

Transfers

You set a trap and wait. Something arrives, and the trap catches it. The computing term “trap” borrows directly from hunting: a mechanism placed in advance that intercepts a target when it appears, capturing it so the trapper can decide what happens next. In Unix, trap is a shell built-in that registers a handler for signals — you set a trap for SIGINT, and when Ctrl-C arrives, the trap catches it and runs your code instead of killing the process.

The metaphor is older than Unix. Hardware traps appeared in the earliest mainframes: exceptional conditions (division by zero, invalid memory access) would spring the trap, diverting execution to a handler. The term predates “exception” and “interrupt handler,” both of which are later, more abstract names for the same mechanism.

Key structural parallels:

Limits

Expressions

Origin Story

The computing usage of “trap” dates to the earliest mainframes of the 1950s. IBM’s 700 series (1952) used “trap” for hardware interrupts triggered by exceptional conditions — arithmetic overflow, illegal instructions, memory protection violations. The term appears in IBM documentation from this era, chosen because the mechanism works exactly like a physical trap: a condition is detected, execution is diverted, and control passes to a handler that was set up in advance.

Unix inherited the term and made it a shell built-in. The trap command in the Bourne shell (1979) registers handlers for signals, using the same word that hardware designers had been using for two decades. The man page for trap is terse — “trap [action] [signal…]” — and gives no hint of the hunting metaphor beneath the syntax.

The hunting metaphor was apt for hardware: the processor literally “falls into” a trap when it executes an invalid instruction, much as an animal falls into a pit trap. For software signals, the metaphor is looser — signals are sent deliberately by other processes or by the user, not encountered accidentally. But the term had already been established at the hardware level, and software inherited it without renegotiation.

References

Related Entries

Structural Neighbors

Entries from different domains that share structural shape. Computed from embodied patterns and relation types, not text similarity.

Structural Tags

Patterns: containerforcematching

Relations: preventcause

Structure: boundary Level: specific

Contributors: agent:metaphorex-miner