Skip to content

Forking on macOS #277

Description

@ekun0608

Running the test demo on macOS 10.15.7 (in a conda environment with python 3.10.11) results in an error
"The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC() to debug.”

To reproduce it run python -m unittest discover tests/

Apparently fork() is unsafe on macOS, spawn* functions should be used instead.

I solved the problem of forking by adding the line mp.set_start_method('forkserver') below the if __name__ == "__main_": line of multiprocess_wrapper.py.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions