Importing torch 1.12.0 breaks subprocess module
Labels: needs reproduction, oncall: binaries, triaged, module: macos

### 🐛 Describe the bug

With torch `1.12.0` just doing `import torch` breaks the `subprocess` standard module.  However this works fine with the previous version of torch (`1.11.0`).

Here is my Python test code:
```python
import subprocess

print(subprocess.run(["echo", "foo"]).returncode)

import torch

print(subprocess.run(["echo", "foo"]).returncode)
```

From a fresh environment:
```
$ pip install torch==1.11.0
Collecting torch==1.11.0
  Downloading torch-1.11.0-cp39-none-macosx_10_9_x86_64.whl (129.9 MB)
     |████████████████████████████████| 129.9 MB 160 kB/s 
Collecting typing-extensions
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Installing collected packages: typing-extensions, torch
Successfully installed torch-1.11.0 typing-extensions-4.4.0
$ 
$ python ./test.py    # this works
foo
0
/Users/tobyroseman/miniconda3/lib/python3.9/site-packages/torch/_masked/__init__.py:223: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at  /Users/distiller/project/pytorch/torch/csrc/utils/tensor_numpy.cpp:68.)
  example_input = torch.tensor([[-3, -2, -1], [0, 1, 2]])
foo
0
$ 
$ pip install torch==1.12.0
Collecting torch==1.12.0
  Downloading torch-1.12.0-cp39-none-macosx_10_9_x86_64.whl (133.6 MB)
     |████████████████████████████████| 133.6 MB 7.4 MB/s 
Requirement already satisfied: typing-extensions in /Users/tobyroseman/miniconda3/lib/python3.9/site-packages (from torch==1.12.0) (4.4.0)
Installing collected packages: torch
  Attempting uninstall: torch
    Found existing installation: torch 1.11.0
    Uninstalling torch-1.11.0:
      Successfully uninstalled torch-1.11.0
Successfully installed torch-1.12.0
$ 
$ 
$ python ./test.py     # this doesn't work after importing torch
foo
0
-4
```

I'm seeing this behavior on an Intel based MacBook Pro. However it works on an M1 MacBook Pro.

### Versions

With torch `1.12.0` installed:

Collecting environment information...
Traceback (most recent call last):
  File "/private/tmp/collect_env.py", line 505, in <module>
    main()
  File "/private/tmp/collect_env.py", line 488, in main
    output = get_pretty_env_info()
  File "/private/tmp/collect_env.py", line 483, in get_pretty_env_info
    return pretty_str(get_env_info())
  File "/private/tmp/collect_env.py", line 330, in get_env_info
    pip_version, pip_list_output = get_pip_packages(run_lambda)
  File "/private/tmp/collect_env.py", line 302, in get_pip_packages
    out = run_with_pip(sys.executable + ' -mpip')
  File "/private/tmp/collect_env.py", line 290, in run_with_pip
    for line in out.splitlines()
AttributeError: 'NoneType' object has no attribute 'splitlines'

With torch `1.11.0` installed:

/Users/tobyroseman/miniconda3/lib/python3.9/site-packages/torch/_masked/__init__.py:223: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at  /Users/distiller/project/pytorch/torch/csrc/utils/tensor_numpy.cpp:68.)
  example_input = torch.tensor([[-3, -2, -1], [0, 1, 2]])
Collecting environment information...
PyTorch version: 1.11.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.3 (x86_64)
GCC version: Could not collect
Clang version: 13.0.0 (clang-1300.0.29.3)
CMake version: version 3.12.1
Libc version: N/A

Python version: 3.9.12 (main, Apr  5 2022, 01:53:17)  [Clang 12.0.0 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] torch==1.11.0
[conda] torch                     1.11.0                   pypi_0    pypi

cc @ezyang @seemethere @malfet @albanD