Skip to content

Commit

Permalink
Remove existing so file first to avoid triggering SIGSEV in running p…
Browse files Browse the repository at this point in the history
…rocess
  • Loading branch information
messense committed Dec 31, 2021
1 parent 4b9f622 commit 04d05c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/module_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,9 @@ pub fn write_bindings_module(

if editable {
let target = rust_module.join(&so_filename);
// Remove existing so file to avoid triggering SIGSEV in running process
// See https://github.com/PyO3/maturin/issues/758
let _ = fs::remove_file(&target);
fs::copy(&artifact, &target).context(format!(
"Failed to copy {} to {}",
artifact.display(),
Expand Down

0 comments on commit 04d05c2

Please sign in to comment.