pub fn start_client_socket_with_permissions(display: &mut Display, ps: Permissions) -> nix::Result<RawFd> {
    let (sock_server, sock_client) = socketpair(AddressFamily::Unix, SockType::Stream, None, SockFlag::empty())?;
    let _ = fcntl::fcntl(sock_server, FcntlArg::F_SETFD(FdFlag::FD_CLOEXEC))?; // not like we're going to exec but still
    let client = unsafe { display.create_client(sock_server) };
    client.set_user_data(Box::into_raw(Box::new(ps)) as *mut _);
    client.set_destructor(destroy_user_data);
    Ok(sock_client)
}
/// Makes a socket pair and attaches the server end to the Wayland server, setting user data to the
/// permissions object.
///
/// Returns the *client* socket that should be passed to the client as `WAYLAND_SOCKET` and closed
/// in the current process after passing.
Makes a socket pair and attaches the server end to the Wayland server, setting user data to the
permissions object.

Returns the *client* socket that should be passed to the client as `WAYLAND_SOCKET` and closed
in the current process after passing.
Makes a socket pair and attaches the server end to the Wayland server setting user data to the permissions object . Returns the * client * socket that should be passed to the client as ` WAYLAND_SOCKET ` and closed in the current process after passing .
pub fn start_client_socket_with_permissions(display: &mut Display, ps: Permissions) -> nix::Result<RawFd> {
    let (sock_server, sock_client) = socketpair(AddressFamily::Unix, SockType::Stream, None, SockFlag::empty())?;
    let _ = fcntl::fcntl(sock_server, FcntlArg::F_SETFD(FdFlag::FD_CLOEXEC))?; // not like we're going to exec but still
    let client = unsafe { display.create_client(sock_server) };
    client.set_user_data(Box::into_raw(Box::new(ps)) as *mut _);
    client.set_destructor(destroy_user_data);
    Ok(sock_client)
}
pub fn start_client_socket_with_permissions ( display : & mut Display , ps : Permissions ) -> nix :: Result < RawFd > { let ( sock_server , sock_client ) = socketpair ( AddressFamily :: Unix , SockType :: Stream , None , SockFlag :: empty ( ) ) ? ; let _ = fcntl :: fcntl ( sock_server , FcntlArg :: F_SETFD ( FdFlag :: FD_CLOEXEC ) ) ? ; // not like we're going to exec but still let client = unsafe { display . create_client ( sock_server ) } ; client . set_user_data ( Box :: into_raw ( Box :: new ( ps ) ) as * mut _ ) ; client . set_destructor ( destroy_user_data ) ; Ok ( sock_client ) }
Makes a socket pair and attaches the server end to the Wayland server, setting user data to the
permissions object.
Makes a socket pair and attaches the server end to the Wayland server setting user data to the permissions object .
display
&mut Display
ps
Permissions