fn open_server_pty() -> Result<File, Error> {
        ftrace::duration!("terminal", "Pty:open_server_pty");
        let server_conn =
            connect_to_service::<DeviceMarker>().context("could not connect to pty service")?;
        let server_chan = server_conn
            .into_channel()
            .or(Err(format_err!("failed to convert pty service into channel")))?;

        // Convert the server into a file descriptor.  We need to do this rather than just using
        // the normal open interface, since otherwise fdio gets confused about the associated event
        // object.  This confusion is caused by how we currently route the pty service through
        // svchost.  Once that routing is gone, this bounce through should be unnecessary.
        let server_pty = fdio::create_fd(zx::Channel::from(server_chan).into())
            .context("failed to create FD from server PTY")?;
        fasync::net::set_nonblock(server_pty.as_raw_fd())
            .context("failed to set PTY to non-blocking")?;
        Ok(server_pty)
    }
/// Opens the initial server side of the pty.
Opens the initial server side of the pty.
Opens the initial server side of the pty .
fn open_server_pty() -> Result<File, Error> {
        ftrace::duration!("terminal", "Pty:open_server_pty");
        let server_conn =
            connect_to_service::<DeviceMarker>().context("could not connect to pty service")?;
        let server_chan = server_conn
            .into_channel()
            .or(Err(format_err!("failed to convert pty service into channel")))?;
        // Convert the server into a file descriptor.  We need to do this rather than just using
        // the normal open interface, since otherwise fdio gets confused about the associated event
        // object.  This confusion is caused by how we currently route the pty service through
        // svchost.  Once that routing is gone, this bounce through should be unnecessary.
        let server_pty = fdio::create_fd(zx::Channel::from(server_chan).into())
            .context("failed to create FD from server PTY")?;
        fasync::net::set_nonblock(server_pty.as_raw_fd())
            .context("failed to set PTY to non-blocking")?;
        Ok(server_pty)
    }
fn open_server_pty ( ) -> Result < File , Error > { ftrace :: duration ! ( " " " " ) ; let server_conn = connect_to_service :: < DeviceMarker > ( ) . context ( " " ) ? ; let server_chan = server_conn . into_channel ( ) . or ( Err ( format_err ! ( " " ) ) ) ? ; // Convert the server into a file descriptor.  We need to do this rather than just using // the normal open interface, since otherwise fdio gets confused about the associated event // object.  This confusion is caused by how we currently route the pty service through // svchost.  Once that routing is gone, this bounce through should be unnecessary. let server_pty = fdio :: create_fd ( zx :: Channel :: from ( server_chan ) . into ( ) ) . context ( " " ) ? ; fasync :: net :: set_nonblock ( server_pty . as_raw_fd ( ) ) . context ( " " ) ? ; Ok ( server_pty ) }
Opens the initial server side of the pty.
Opens the initial server side of the pty .