mirror of
https://github.com/daijro/camoufox.git
synced 2026-10-07 00:00:33 +00:00
fix(virtdisplay): wait() Xvfb child process to prevent zombie process
This commit is contained in:
@@ -116,6 +116,13 @@ class VirtualDisplay:
|
||||
if self.debug:
|
||||
print("Terminating virtual display:", self._display)
|
||||
self.proc.terminate()
|
||||
try:
|
||||
self.proc.wait(timeout=5)
|
||||
except subprocess.TimeoutExpired:
|
||||
if self.debug:
|
||||
print("Xvfb did not exit in time, killing forcefully")
|
||||
self.proc.kill()
|
||||
self.proc.wait()
|
||||
|
||||
@staticmethod
|
||||
def _assert_linux() -> None:
|
||||
|
||||
Reference in New Issue
Block a user