Tests: skip the SIGINT launcher case on bash 3.2 (macOS's), which doesn't run the trap during wait

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
saphidandClaude Opus 5.5 committed 2026-09-29 12:35:23 +10:00
1 parent 5aea46afd0
commit 448720d8d6
1 file changed
+5 -1
+5 -1
View File
@@ -98,7 +98,11 @@ class LauncherTests(unittest.TestCase):
self.exercise(True)
def test_hangup_and_interrupt_cleanup(self):
for sig in (signal.SIGHUP, signal.SIGINT):
# macOS's stock bash 3.2 doesn't run a SIGINT trap while blocked in `wait`;
# the Frame's bash (5.x) does, and that's where the launcher runs.
major = subprocess.run(['bash', '-c', 'echo ${BASH_VERSINFO[0]}'], capture_output=True, text=True).stdout.strip()
sigs = (signal.SIGHUP, signal.SIGINT) if major.isdigit() and int(major) >= 4 else (signal.SIGHUP,)
for sig in sigs:
with self.subTest(sig=sig):
self.exercise(True, sig)