Windows-related build fixes (#1344)

* it now builds, but kanidmd stack overflows on windows while running initialise_helper - tests passing
This commit is contained in:
James Hodgkinson 2023-01-25 09:43:24 +10:00 committed by GitHub
parent c63dc1f722
commit 980cb31ce8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 30 deletions

View file

@ -240,3 +240,15 @@ release/kanidm-unixd:
--bin kanidm_unixd_tasks \
--bin kanidm_cache_clear \
--bin kanidm_cache_invalidate
# cert things
.PHONY: cert/clean
cert/clean: ## clean out the insecure cert bits
cert/clean:
rm -f /tmp/kanidm/*.pem
rm -f /tmp/kanidm/*.cnf
rm -f /tmp/kanidm/*.csr
rm -f /tmp/kanidm/ca.txt*
rm -f /tmp/kanidm/ca.{cnf,srl,srl.old}

View file

@ -298,6 +298,8 @@ async fn main() {
match sctx {
Ok(mut sctx) => {
loop {
#[cfg(target_family = "unix")]
{
tokio::select! {
Ok(()) = tokio::signal::ctrl_c() => {
break
@ -334,6 +336,15 @@ async fn main() {
}
}
}
#[cfg(target_family = "windows")]
{
tokio::select! {
Ok(()) = tokio::signal::ctrl_c() => {
break
}
}
}
}
eprintln!("Signal received, shutting down");
// Send a broadcast that we are done.
sctx.shutdown().await;