Skip to content

Commit b0b0f3d

Browse files
authored
Mask the stdout/stderr for the inner daemon process on MacOS (#1389)
1 parent 9f7612c commit b0b0f3d

File tree

7 files changed

+15
-9
lines changed

7 files changed

+15
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
This document records all notable changes to [HTTPie](https://httpie.io).
44
This project adheres to [Semantic Versioning](https://semver.org/).
55

6+
## [3.2.1](https://github.com/httpie/httpie/compare/3.1.0...3.2.0) (2022-05-06)
7+
8+
- Improved support for determining auto-streaming when the `Content-Type` header includes encoding information. ([#1383](https://github.com/httpie/httpie/pull/1383))
9+
- Fixed the display of the crash happening in the secondary process for update checks. ([#1388](https://github.com/httpie/httpie/issues/1388))
10+
611
## [3.2.0](https://github.com/httpie/httpie/compare/3.1.0...3.2.0) (2022-05-05)
712

813
- Added a warning for notifying the user about the new updates. ([#1336](https://github.com/httpie/httpie/pull/1336))

extras/man/http.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_pages.py.
2-
.TH http 1 "2022-05-05" "HTTPie 3.2.0" "HTTPie Manual"
2+
.TH http 1 "2022-05-06" "HTTPie 3.2.1" "HTTPie Manual"
33
.SH NAME
44
http
55
.SH SYNOPSIS

extras/man/httpie.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" This file is auto-generated from the parser declaration in httpie/manager/cli.py by extras/scripts/generate_man_pages.py.
2-
.TH httpie 1 "2022-05-05" "HTTPie 3.2.0" "HTTPie Manual"
2+
.TH httpie 1 "2022-05-06" "HTTPie 3.2.1" "HTTPie Manual"
33
.SH NAME
44
httpie
55
.SH SYNOPSIS

extras/man/https.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_pages.py.
2-
.TH https 1 "2022-05-05" "HTTPie 3.2.0" "HTTPie Manual"
2+
.TH https 1 "2022-05-06" "HTTPie 3.2.1" "HTTPie Manual"
33
.SH NAME
44
https
55
.SH SYNOPSIS

httpie/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
"""
55

6-
__version__ = '3.2.0'
7-
__date__ = '2022-05-05'
6+
__version__ = '3.2.1'
7+
__date__ = '2022-05-06'
88
__author__ = 'Jakub Roztocil'
99
__licence__ = 'BSD'

httpie/internal/daemon_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import List
44

55
from httpie.context import Environment
6-
from httpie.internal.update_warnings import _fetch_updates
6+
from httpie.internal.update_warnings import _fetch_updates, _get_suppress_context
77
from httpie.status import ExitStatus
88

99
STATUS_FILE = '.httpie-test-daemon-status'
@@ -44,6 +44,7 @@ def run_daemon_task(env: Environment, args: List[str]) -> ExitStatus:
4444
assert options.daemon
4545
assert options.task_id in DAEMONIZED_TASKS
4646
with redirect_stdout(env.devnull), redirect_stderr(env.devnull):
47-
DAEMONIZED_TASKS[options.task_id](env)
47+
with _get_suppress_context(env):
48+
DAEMONIZED_TASKS[options.task_id](env)
4849

4950
return ExitStatus.SUCCESS

httpie/internal/daemons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import sys
1212
import httpie.__main__
1313
from contextlib import suppress
14-
from subprocess import Popen
14+
from subprocess import Popen, DEVNULL
1515
from typing import Dict, List
1616
from httpie.compat import is_frozen, is_windows
1717

@@ -26,7 +26,7 @@ def _start_process(cmd: List[str], **kwargs) -> Popen:
2626
if not is_frozen:
2727
main_entrypoint = httpie.__main__.__file__
2828
prefix += [main_entrypoint]
29-
return Popen(prefix + cmd, close_fds=True, shell=False, **kwargs)
29+
return Popen(prefix + cmd, close_fds=True, shell=False, stdout=DEVNULL, stderr=DEVNULL, **kwargs)
3030

3131

3232
def _spawn_windows(cmd: List[str], process_context: ProcessContext) -> None:

0 commit comments

Comments
 (0)