`child_fd` is not a file handle!
Check for boolean values first. Fixes #9742.

Instead of raising `RuntimeError`, raise `TerminalException`.
Merge pull request #9778 from s0undt3ch/develop

VT fixes