Add AttachToParentConsole API
Fix merge conflicts