feat: made unix-loader more stable on FreeBSD

This commit is contained in:
Andrew Rioux
2025-02-03 02:37:17 -05:00
parent d8a277e769
commit 00331ec550
9 changed files with 159 additions and 59 deletions

View File

@@ -4,3 +4,5 @@ edition = "2024"
version.workspace = true
[dependencies]
libc = "0.2"
errno = "0.3"

View File

@@ -1,3 +1,14 @@
fn main() {
println!("Hello, world!");
#[cfg(target_os = "freebsd")]
unsafe {
let sem = libc::sem_open(c"/libcrypto".as_ptr(), 0);
libc::sem_post(sem);
}
println!("Hello, world!");
unsafe { println!("\n{}\n", libc::getpid()) };
loop {}
}