Skip to content

Commit

Permalink
fix: disable background threads where we use fork
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: 57f4c29c-44d5-4089-a81b-01ae28e5377a -->
  • Loading branch information
rgrinberg committed Jul 4, 2023
1 parent dccec21 commit 57f9a7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Unreleased
----------

- Disable background operations on MacOS and other Unixes where we rely on
fork. (#8100, fixes #8083, @rgrinberg)

3.9.0 (2023-06-28)
------------------

Expand Down
9 changes: 7 additions & 2 deletions src/dune_config/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ let copy_file =
register t;
t

let background_default =
match Platform.OS.value with
| Linux | Windows -> `Enabled
| _ -> `Disabled

let background_actions =
let t =
{ name = "background_actions"
Expand All @@ -111,7 +116,7 @@ let background_digests =
let t =
{ name = "background_digests"
; of_string = Toggle.of_string
; value = `Enabled
; value = background_default
}
in
register t;
Expand All @@ -121,7 +126,7 @@ let background_sandboxes =
let t =
{ name = "background_sandboxes"
; of_string = Toggle.of_string
; value = `Enabled
; value = background_default
}
in
register t;
Expand Down

0 comments on commit 57f9a7c

Please sign in to comment.