File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ export async function startXvfb({ size, options }) {
4242 } ) ;
4343
4444 const xvfbProcess = execa ( command , args , {
45- stdio : silent ? 'ignore' : 'inherit'
45+ stdio : silent ? 'ignore' : 'inherit' ,
46+ forceKillAfterDelay : 1000
4647 } ) ;
4748
4849 xvfbProcess . catch ( error => {
@@ -68,21 +69,10 @@ export async function stopXvfb(xvfbSession) {
6869 }
6970
7071 try {
71- xvfbSession . process . kill ( 'SIGTERM' ) ;
72+ xvfbSession . process . kill ( ) ;
7273 } catch {
7374 // Just swallow
7475 }
75-
76- const timeout = 1000 ;
77- const start = Date . now ( ) ;
78- while ( Date . now ( ) - start < timeout ) {
79- try {
80- process . kill ( xvfbSession . process . pid , 0 ) ;
81- await new Promise ( resolve => setTimeout ( resolve , 100 ) ) ;
82- } catch {
83- return ;
84- }
85- }
8676}
8777
8878export class XVFB {
You can’t perform that action at this time.
0 commit comments