fix(backend): backend compatability on macos (#1340)

This commit is contained in:
Ryan Rich
2023-03-31 00:00:54 -07:00
committed by GitHub
parent 624279e568
commit dfd2abc764
2 changed files with 12 additions and 0 deletions

View File

@@ -8,3 +8,14 @@ rustflags = [
]
incremental = true
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

View File

@@ -2417,6 +2417,7 @@ async fn handle_child(
let write_logs_delay = Duration::from_millis(500);
let pid = child.id();
#[cfg(target_os = "linux")]
if let Some(pid) = pid {
//set the highest oom priority
let mut file = File::create(format!("/proc/{pid}/oom_score_adj")).await?;