Skip to content

Commit 1eab1a1

Browse files
chore(asm): fix win32 fork usage error [backport 2.1] (#7141)
Backport 4446068 from #7126 to 2.1. Follow-up on the fix for "Mac OS X spawn bomb" #7096 There is no "fork" context in Win32 platform, only "spawn" Fixes Windows builds, currently broken: https://github.com/DataDog/dd-trace-py/actions/runs/6387793629 ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. Co-authored-by: Federico Mon <[email protected]>
1 parent a20fd11 commit 1eab1a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ddtrace/settings/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import multiprocessing
33
import os
44
import re
5+
import sys
56
from typing import List
67
from typing import Optional
78
from typing import Tuple
@@ -191,7 +192,9 @@ class Config(object):
191192
available and can be updated by users.
192193
"""
193194

194-
_extra_services_queue = multiprocessing.get_context("fork").Queue(512) # type: multiprocessing.Queue
195+
_extra_services_queue = multiprocessing.get_context("fork" if sys.platform != "win32" else "spawn").Queue(
196+
512
197+
) # type: multiprocessing.Queue
195198

196199
class _HTTPServerConfig(object):
197200
_error_statuses = "500-599" # type: str

0 commit comments

Comments
 (0)