mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-12 09:22:26 -04:00
daemon: Start restructuring config reloading
This commit is contained in:
parent
f30c54c907
commit
23267c65e0
3 changed files with 55 additions and 39 deletions
11
src/lib.rs
11
src/lib.rs
|
@ -10,7 +10,6 @@ use std::future::Future;
|
|||
use std::path::{Path, PathBuf};
|
||||
use tokio::fs::File;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio::signal::unix::{signal, SignalKind};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tracing::{info, warn};
|
||||
|
||||
|
@ -123,16 +122,6 @@ pub(crate) fn get_appid(pid: u32) -> Result<Option<u64>> {
|
|||
}
|
||||
}
|
||||
|
||||
async fn reload() -> Result<()> {
|
||||
loop {
|
||||
let mut sighup = signal(SignalKind::hangup())?;
|
||||
sighup
|
||||
.recv()
|
||||
.await
|
||||
.ok_or(anyhow!("SIGHUP handler failed!"))?;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::testing;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue