1
0
Fork 0
forked from wry/wry

state: store compositor pid

This commit is contained in:
Julian Orth 2026-03-07 14:08:06 +01:00
parent 13483de017
commit d8d73ba8e1
2 changed files with 6 additions and 2 deletions

View file

@ -199,7 +199,8 @@ fn start_compositor2(
test_future: Option<TestFuture>,
caps_thread: Option<PrCapsThread>,
) -> Result<(), CompositorError> {
log::info!("pid = {}", uapi::getpid());
let pid = uapi::getpid();
log::info!("pid = {pid}");
log::info!("version = {VERSION}");
if did_elevate_scheduler() {
log::info!("Running with elevated scheduler: SCHED_RR");
@ -224,6 +225,7 @@ fn start_compositor2(
let crit_ids = Rc::new(CritMatcherIds::default());
let eventfd_cache = EventfdCache::new(&ring, &engine);
let state = Rc::new(State {
pid,
kb_ctx,
backend: CloneCell::new(Rc::new(DummyBackend)),
forker: Default::default(),

View file

@ -145,10 +145,12 @@ use {
time::Duration,
},
thiserror::Error,
uapi::OwnedFd,
uapi::{OwnedFd, c},
};
pub struct State {
#[expect(dead_code)]
pub pid: c::pid_t,
pub kb_ctx: KbvmContext,
pub backend: CloneCell<Rc<dyn Backend>>,
pub forker: CloneCell<Option<Rc<ForkerProxy>>>,