pub fn with_pty_manager<R, F: FnOnce(&PtyManager) -> R>(f: F) -> Option<R>
Execute a function with the PTY manager