Hi everyone, python-trio sometimes exhibits test failures, as in the following --8<---------------cut here---------------start------------->8--- =================================== FAILURES =================================== ____________________ test_wait_reapable_fails[open_process] ____________________ [gw15] linux -- Python 3.10.7 /gnu/store/375350pi1l1izgnx6dnsqmg4xjyprx8q-python-wrapper-3.10.7/bin/python background_process = @pytest.mark.skipif(not posix, reason="POSIX specific") @background_process_param async def test_wait_reapable_fails(background_process): > old_sigchld = signal.signal(signal.SIGCHLD, signal.SIG_IGN) trio/tests/test_subprocess.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signalnum = , handler = @_wraps(_signal.signal) def signal(signalnum, handler): > handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) E ValueError: signal only works in main thread of the main interpreter /gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/signal.py:56: ValueError _______________ test_wait_reapable_fails[run_process in nursery] _______________ [gw15] linux -- Python 3.10.7 /gnu/store/375350pi1l1izgnx6dnsqmg4xjyprx8q-python-wrapper-3.10.7/bin/python background_process = @pytest.mark.skipif(not posix, reason="POSIX specific") @background_process_param async def test_wait_reapable_fails(background_process): > old_sigchld = signal.signal(signal.SIGCHLD, signal.SIG_IGN) trio/tests/test_subprocess.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signalnum = , handler = @_wraps(_signal.signal) def signal(signalnum, handler): > handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) E ValueError: signal only works in main thread of the main interpreter /gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/signal.py:56: ValueError =========================== short test summary info ============================ FAILED trio/tests/test_subprocess.py::test_wait_reapable_fails[open_process] FAILED trio/tests/test_subprocess.py::test_wait_reapable_fails[run_process in nursery] ================== 2 failed, 371 passed, 17 skipped in 3.82s =================== --8<---------------cut here---------------end--------------->8--- Note that I am on Linux 6.8-rc3 currently. Can anyone reproduce? Best, -- Josselin Poiret