pub fn detach_console() -> Result<()>
ui
Detaches the current process from its console.
If no other processes use the console, it will be destroyed.