Skip to main content

report_failed_child

Function report_failed_child 

Source
pub fn report_failed_child(what: &str, e: &Error)
Expand description

Report a child that could not be started, and hold the screen while it is read.

The caller has already left the alternate screen, so this lands where the child would have drawn, and the pause is what stops resume() wiping it. Without this the whole failure was invisible: the picker suspended, the child never ran, the picker resumed, and the only evidence was a flicker.

Written to /dev/tty, never to stdout. Everything else in this file is printed by a CHILD, whose stdout act_child has already pointed at the terminal. This one runs in the PICKER, whose stdout carries exactly one thing, the chosen pane id. Printing it cost the first attempt at this fix: the report went down the pipe to whoever called the picker, the screen stayed blank, and the test caught it.