pub fn detach_from_tty() -> Result<()>
Detach from the controlling TTY by starting a new session.
This is useful for spawning background processes that should not receive signals from the controlling terminal.