Skip to content

Commit

Permalink
Wait for spawn child in order to avoit concurrency problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoolioh committed Sep 26, 2024
1 parent 1d90886 commit ba13c1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions builder/build/arch/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ pub fn strip_libraries(lib_path: &str) {
}

pub fn fix_soname(lib_path: &str) {
Command::new("patchelf")
let mut patch_soname = Command::new("patchelf")
.arg("--set-soname")
.arg(PROF_DYNAMIC_LIB)
.arg(lib_path.to_owned() + "/" + PROF_DYNAMIC_LIB)
.spawn()
.expect("failed to change the soname");
.expect("failed to span patchelf");

patch_soname.wait().expect("failed to change the soname");
}
6 changes: 4 additions & 2 deletions builder/build/arch/musl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ pub fn strip_libraries(lib_path: &str) {
}

pub fn fix_soname(lib_path: &str) {
Command::new("patchelf")
let mut patch_soname = Command::new("patchelf")
.arg("--set-soname")
.arg(PROF_DYNAMIC_LIB)
.arg(lib_path)
.spawn()
.expect("failed to change the soname");
.expect("failed to spawn patchelf");

patch_soname.wait().expect("failed to change the soname");
}

0 comments on commit ba13c1c

Please sign in to comment.