Ver Fonte

test(subprocess): preserve Windows job descendant

pku-xht há 2 meses atrás
pai
commit
60c729250e

+ 1 - 1
packages/subprocess/subprocess-local/tests/native-windows.spec.ts

@@ -94,7 +94,7 @@ describe.skipIf(!windowsNative)('Windows Job native containment', () => {
     const script = `
       const { spawn } = require('node:child_process')
       const { writeFileSync } = require('node:fs')
-      const child = spawn(process.execPath, ['-e', 'setInterval(() => {}, 1000)'], { stdio: 'ignore' })
+      const child = spawn(process.execPath, ['-e', 'setInterval(() => {}, 1000)'], { stdio: 'ignore', detached: true })
       writeFileSync(${JSON.stringify(pidFile)}, String(child.pid))
       writeFileSync(${JSON.stringify(factsFile)}, JSON.stringify({ cwd: process.cwd(), value: process.env.TARGET_VALUE, arg: process.argv[1] }))
       child.unref()