From 57e6f1f355b62599911d23dfeb6ce0912be21507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20=C5=98=C3=ADha?= Date: Thu, 31 Aug 2023 17:02:37 +0200 Subject: [PATCH] Remove unnecessary process wait on MacOS (#1523) - remove process.communicate() in MacOS causing wait for subprocess even when the subprocess results were not used. --- httpie/internal/daemons.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/httpie/internal/daemons.py b/httpie/internal/daemons.py index 929f960ca0..906245949e 100644 --- a/httpie/internal/daemons.py +++ b/httpie/internal/daemons.py @@ -87,10 +87,7 @@ def _spawn_posix(args: List[str], process_context: ProcessContext) -> None: if platform.system() == 'Darwin': # Double-fork is not reliable on MacOS, so we'll use a subprocess # to ensure the task is isolated properly. - process = _start_process(args, env=process_context) - # Unlike windows, since we already completed the fork procedure - # we can simply join the process and wait for it. - process.communicate() + _start_process(args, env=process_context) else: os.environ.update(process_context) with suppress(BaseException):