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

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

[2014.1] VT Fixes