<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
The `wait_for` integration test when run on macOS hosts in combination with some other tests results in a stack trace due to a zombie process. This appears in the `devel` nightlihtlies and occasionally in PRs. I am unable to duplicate this issue when running only the `wait_for` test, so it seems to be a test interaction issue. [Example test failure](https://app.shippable.com/github/ansible/ansible/runs/175420/17/tests).


##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
`test/integration/targets/wait_for`
##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
devel
```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
Shippable

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Shippable

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Run the nightly integration test.

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
Tests pass.

##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
Test fails with stack trace
<!--- Paste verbatim command output between quotes -->
```paste below
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psutil/_psosx.py", line 363, in catch_zombie
    yield
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psutil/_psosx.py", line 532, in connections
    rawlist = cext.proc_connections(self.pid, families, types)
ProcessLookupError: [Errno 3] No such process (originated from proc_pidinfo())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/root/.ansible/tmp/ansible-tmp-1603438181.978554-24193-108782891618547/AnsiballZ_wait_for.py", line 140, in <module>
    _ansiballz_main()
  File "/var/root/.ansible/tmp/ansible-tmp-1603438181.978554-24193-108782891618547/AnsiballZ_wait_for.py", line 132, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/var/root/.ansible/tmp/ansible-tmp-1603438181.978554-24193-108782891618547/AnsiballZ_wait_for.py", line 81, in invoke_module
    runpy.run_module(mod_name='ansible.modules.wait_for', init_globals=None, run_name='__main__', alter_sys=True)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_wait_for_payload_dp2d351v/ansible_wait_for_payload.zip/ansible/modules/wait_for.py", line 667, in <module>
  File "/tmp/ansible_wait_for_payload_dp2d351v/ansible_wait_for_payload.zip/ansible/modules/wait_for.py", line 651, in main
  File "/tmp/ansible_wait_for_payload_dp2d351v/ansible_wait_for_payload.zip/ansible/modules/wait_for.py", line 295, in get_active_connections_count
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psutil/__init__.py", line 1182, in connections
    return self._proc.connections(kind)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psutil/_psosx.py", line 342, in wrapper
    return fun(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psutil/_psosx.py", line 532, in connections
    rawlist = cext.proc_connections(self.pid, families, types)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psutil/_psosx.py", line 374, in catch_zombie
    raise ZombieProcess(proc.pid, proc._name, proc._ppid)
psutil.ZombieProcess: psutil.ZombieProcess process still exists but it's a zombie (pid=23005)
```

description:
      - This overrides the normal error message from a failure to meet the required conditions.
    type: str
    version_added: "2.4"
notes:
  - The ability to use search_regex with a port connection was added in Ansible 1.7.
  - Prior to Ansible 2.4, testing for the absence of a directory or UNIX socket did not work correctly.
  - Prior to Ansible 2.4, testing for the presence of a file did not work correctly if the remote user did not have read access to that file.
  - Under some circumstances when using mandatory access control, a path may always be treated as being absent even if it exists, but
    can't be modified or created by the remote user either.
  - When waiting for a path, symbolic links will be followed.  Many other modules that manipulate files do not follow symbolic links,
    so operations on the path using other modules may not work exactly as expected.
seealso:
- module: ansible.builtin.wait_for_connection
- module: ansible.windows.win_wait_for
- module: community.windows.win_wait_for_process
author:
    - Jeroen Hoekx (@jhoekx)
    - John Jarvis (@jarv)
    - Andrii Radyk (@AnderEnder)
'''
EXAMPLES = r'''
- name: Sleep for 300 seconds and continue with play
  wait_for:
    timeout: 300
  delegate_to: localhost
- name: Wait for port 8000 to become open on the host, don't start checking for 10 seconds
  wait_for:
    port: 8000
    delay: 10