Signal Handler
Noun · Development
Definitions
A user-defined function registered with the operating system to execute when a process receives a specific signal (e.g., SIGTERM, SIGINT, SIGHUP). Because handlers run asynchronously and interrupt normal execution, they must be async-signal-safe — only calling a restricted set of reentrant functions.
In plain English: A piece of code that runs automatically when the operating system sends your program a specific notification, like 'please shut down now.'
Example: "We installed a SIGTERM handler that flushes the write-ahead log and closes connections before the container is killed."