podbox-guest 0.7.2

Guest-side daemon and entrypoint for podbox containers: socket protocol, interceptors, and idle shutdown.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::interceptors::send_to_host;
use crate::protocol::GuestMessage;

/// Parse xdg-open argv and send an open request to the host.
pub fn run(args: &[String]) {
    if args.len() < 2 {
        eprintln!("xdg-open: missing URI argument");
        std::process::exit(1);
    }

    let uri = args[1].clone();

    let msg = GuestMessage::XdgOpen { uri };

    if let Err(e) = send_to_host(&msg) {
        eprintln!("xdg-open interceptor: failed to send: {e}");
    }
}