Compare commits

...

2 Commits

Author SHA1 Message Date
00afc7130b use relative path for shared_memory_dependency 2025-10-30 14:10:09 +01:00
830dc9671c add default value for NUM_AGENTS 2025-10-29 16:22:42 +01:00
4 changed files with 5 additions and 6 deletions

1
Cargo.lock generated
View File

@@ -26,7 +26,6 @@ checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5"
[[package]]
name = "shared_memory_heap"
version = "0.1.0"
source = "git+https://gitea.rixxc.de/rixxc/shared_memory_heap.git#ef9bcc94fb04d7191514a249c78d608d2f7cb9a6"
dependencies = [
"libc",
]

View File

@@ -8,4 +8,4 @@ edition = "2021"
[dependencies]
anyhow = "1.0.82"
libc = "0.2.153"
shared_memory_heap = { git = "https://gitea.rixxc.de/rixxc/shared_memory_heap.git" }
shared_memory_heap = { path = "../shared_memory_heap/" }

View File

@@ -47,9 +47,9 @@ impl Agent {
if child == 0 {
// child
close(0);
close(1);
close(2);
// close(0);
// close(1);
// close(2);
let path = CString::new(agent_path.as_os_str().as_encoded_bytes()).unwrap();
let data_fd = CString::new(data_fd.to_string()).unwrap();

View File

@@ -13,7 +13,7 @@ static ED25519AGENT: LazyLock<Vec<Mutex<Agent>>> = LazyLock::new(|| {
let keyfile_path =
std::env::var("ED25519_KEYFILE").expect("Ed25519_KEYFILE environment variable missing");
let num_agents: usize = std::env::var("NUM_AGENTS")
.expect("NUM_AGENTS environment variable missing")
.unwrap_or("1".to_string())
.parse()
.expect("NUM_AGENTS should be an integer");
let mut agents = Vec::with_capacity(num_agents);