feat: gpauth support Windows

This commit is contained in:
Kevin Yue committed 2025-02-02 18:43:28 +08:00
1 parent fe3d3df662
commit 3175d1083a
14 files changed
+199 -21

No files matched your search

+15 -9
View File
@@ -6,15 +6,21 @@ pub async fn shutdown_signal() {
};
#[cfg(unix)]
let terminate = async {
signal::unix::signal(signal::unix::SignalKind::terminate())
.expect("failed to install signal handler")
.recv()
.await;
};
{
let terminate = async {
signal::unix::signal(signal::unix::SignalKind::terminate())
.expect("failed to install signal handler")
.recv()
.await;
};
tokio::select! {
_ = ctrl_c => {},
_ = terminate => {},
}
}
tokio::select! {
_ = ctrl_c => {},
_ = terminate => {},
#[cfg(not(unix))]
{
ctrl_c.await;
}
}