Needle/Thinking out loud

The dead-man switch: what happens when a fan app dies

August 5, 2026 · 2 min read

Trains solved this problem a century ago. The driver holds a pedal or a handle, constantly, and the holding itself is the message: someone is here. Let go, from heart attack, distraction, or sleep, and the train doesn’t wait to find out why. It brakes. The mechanism is called a dead-man switch, and the name is exactly as blunt as the problem it solves.

A fan control app has the same problem wearing a smaller hat. While Readout is running, it can hold your fans at a speed you chose. The question that kept me honest while building it wasn’t what the app does while it’s alive. It was: who gives the fans back when the app dies holding them?

Dying is easy; freezing is the hard case

The easy version is a crash. The privileged helper, the small separate program that actually talks to the fan hardware, keeps a connection open to the app, and when the app crashes, the connection snaps. The helper notices immediately and restores automatic control. Measured on my machine: under a second.

The nasty version is a freeze. A hung app hasn’t crashed. Its connection is still open, still apparently alive, like a train driver slumped forward with a hand still resting on the controls. The connection can’t tell you anything, so Readout doesn’t rely on it. The app must actively send a heartbeat every few seconds, and the helper treats silence as the message: fifteen seconds without one and the fans go back to automatic. I tested it the only honest way I could find, freezing the app mid-flight with its connection deliberately left open, and the helper handed the fans back on schedule.

The rest of the ways to die

A power cut kills the app and helper together, and no revert code runs. So at its next launch, the helper’s first act is to check whether the fans were left stranded in a forced mode by an earlier life, and clear it if so. Quitting normally reverts. Force-quit reverts. And independent of all of it, if any sensor reaches 95 °C, Readout forces automatic control regardless of what you asked for, because your preference was formed under cooler assumptions.

Software that takes control of hardware should be designed for its own absence.

Ask for the receipts

None of this is exotic engineering. It’s a heartbeat, a timer, and a habit of assuming the worst about my own software. What surprised me, surveying the category, is how rarely any of it is written down. Fan apps tell you what they can do; almost none tell you what happens when they stop. So Readout ships its own receipts: Readout --fantest runs the full take-control-and-restore round trip on your machine, and --fanstrand deliberately dies without cleaning up, so you can watch the helper recover on its own. Don’t take my word for the dead-man switch. Trip it.

← All Needle notes