add assert

This commit is contained in:
2024-08-26 11:53:36 +02:00
parent a8ab06df98
commit 8411f966da

View File

@@ -21,7 +21,7 @@ fn main() {
let sync_fd: c_int = args[1]
.parse()
.expect("Please provide a valid file descriptor as first argument");
.expect("Please provide a valid file descriptor as second argument");
let shared_memory = unsafe {
mmap(
@@ -55,6 +55,8 @@ fn main() {
.as_raw_fd()
.try_into()
.unwrap();
assert!(private_file > 2);
println!("{}", private_file);
unsafe {
agent_start(shared_memory, sync_memory, private_file);