From df82a9638cd8fbe8a33c5969ff9c0d348d069adb Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 23 Dec 2019 15:45:39 -0500 Subject: Use abspath to rc file so that chdir doesn't bork us. #890 --- coverage/multiproc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'coverage/multiproc.py') diff --git a/coverage/multiproc.py b/coverage/multiproc.py index c466301f..2931b3be 100644 --- a/coverage/multiproc.py +++ b/coverage/multiproc.py @@ -6,6 +6,7 @@ import multiprocessing import multiprocessing.process import os +import os.path import sys import traceback @@ -85,7 +86,7 @@ def patch_multiprocessing(rcfile): # Set the value in ProcessWithCoverage that will be pickled into the child # process. - os.environ["COVERAGE_RCFILE"] = rcfile + os.environ["COVERAGE_RCFILE"] = os.path.abspath(rcfile) # When spawning processes rather than forking them, we have no state in the # new process. We sneak in there with a Stowaway: we stuff one of our own -- cgit v1.2.1