refactor: use new method for creating privileged sockets and running the executable
This commit is contained in:
parent
12bd4302c9
commit
0cc6fe8758
1 changed files with 4 additions and 3 deletions
|
|
@ -75,13 +75,14 @@ async fn main() -> Result<()> {
|
||||||
env,
|
env,
|
||||||
vec![fd],
|
vec![fd],
|
||||||
);
|
);
|
||||||
|
let (env, fd) = comp::create_privileged_socket(&mut sockets, &env_vars).wrap_err("failed to create applet host")?;
|
||||||
generic::run_executable(
|
generic::run_executable(
|
||||||
token.child_token(),
|
token.child_token(),
|
||||||
info_span!(parent: None, "cosmic-applet host"),
|
info_span!(parent: None, "cosmic-applet-host"),
|
||||||
"cosmic-applet-host",
|
"cosmic-applet-host",
|
||||||
vec![],
|
vec![],
|
||||||
comp::create_privileged_socket(&mut sockets, &env_vars)
|
env,
|
||||||
.wrap_err("failed to create applet-host socket")?,
|
vec![fd]
|
||||||
);
|
);
|
||||||
socket_tx.send(sockets).unwrap();
|
socket_tx.send(sockets).unwrap();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue