Skip to main content

Module stdin_helper

Module stdin_helper 

Source
Expand description

Stdin reader with configurable timeout to prevent indefinite blocking. Stdin reader with timeout to prevent indefinite blocking when the upstream pipe is held open without sending data.

Used by remember --body-stdin and edit body input to enforce a deadline (default 60s). When the timeout fires, the spawned reader thread is leaked because std::io::stdin() cannot be cancelled from outside; this is acceptable in error scenarios because the process is about to exit anyway.

Functionsยง

read_stdin_with_timeout
Reads stdin to a String with a hard deadline.