Skip to content

Conversation

@AlgoFoe
Copy link
Contributor

@AlgoFoe AlgoFoe commented Jan 4, 2026

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

  • On Windows, setting multiprocessing_aware=True can intermittently trigger shutdown errors when multiprocessing_logging is installed bcoz background logging threads may access closed pipe handles even in single-process exec.

What does this PR do?

  • It avoids installing the multiprocessing_logging handler in the main process and only enables it when running inside child processes.

References

How has this PR been tested?

  • Tested locally on Windows by running start_logging() with multiprocessing_aware=True both with and without spawning child processes.

Is this a breaking change?

  • No.

Does this PR require an update to the documentation?

  • No.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@adamltyson adamltyson requested a review from JoeZiminski January 8, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash with multiprocessing_aware

1 participant