Skip to content

Commit

Permalink
Remove unnecessary process wait on MacOS (#1523)
Browse files Browse the repository at this point in the history
- remove process.communicate() in MacOS causing wait for subprocess even
when the subprocess results were not used.
  • Loading branch information
cedel1 committed Aug 31, 2023
1 parent e52a60e commit 57e6f1f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions httpie/internal/daemons.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 57e6f1f

Please sign in to comment.