mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Wait for import-environment to finish
This commit is contained in:
+16
-2
@@ -166,8 +166,22 @@ impl Niri {
|
|||||||
dbus-update-activation-environment WAYLAND_DISPLAY",
|
dbus-update-activation-environment WAYLAND_DISPLAY",
|
||||||
])
|
])
|
||||||
.spawn();
|
.spawn();
|
||||||
if let Err(err) = rv {
|
// Wait for the import process to complete, otherwise services will start too fast
|
||||||
warn!("error spawning shell to import environment into systemd: {err:?}");
|
// without environment variables available.
|
||||||
|
match rv {
|
||||||
|
Ok(mut child) => match child.wait() {
|
||||||
|
Ok(status) => {
|
||||||
|
if !status.success() {
|
||||||
|
warn!("import environment shell exited with {status}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
warn!("error waiting for import environment shell: {err:?}");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Err(err) => {
|
||||||
|
warn!("error spawning shell to import environment into systemd: {err:?}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up zbus, make sure it happens before anything might want it.
|
// Set up zbus, make sure it happens before anything might want it.
|
||||||
|
|||||||
Reference in New Issue
Block a user