Files
archived-camoufox/python/tests
Jake WriterandClaude Opus 5.5 9f94b0ea46 Stop Xvfb when the process that launched it dies (#868)
headless="virtual" started Xvfb in its own session and stopped it only on
the browser's close path. A launcher ended by a signal (timeout, a
supervisor, a cancelled CI job) never reaches that path, so its Xvfb ran
forever, together with the session bus and desktop helpers Firefox
autolaunched on that display.

Both packages now exec Xvfb through `setpriv --pdeathsig TERM`, so the
kernel signals it when its launcher dies, even by SIGKILL. SIGTERM lets
Xvfb remove its own lock and socket, and the autolaunched bus exits when
it loses its X connection. setpriv comes from util-linux.

The leak suite missed this because every crash test keeps the launcher
alive to tear down, and leak_check follows only our descendants, which an
orphan no longer is. test_launcher_sigkill_leaves_nothing_on_its_display
kills the launcher and looks machine-wide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:31:03 -06:00
..
2026-10-06 19:10:22 -06:00