Skip to content

Commit 8cdac3f

Browse files
Merge branch 'feat/exp-flag-alias-consumption' into share-filter
2 parents 9cd3bce + 22929a0 commit 8cdac3f

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

tools/scripts/run-manifest-e2e.mjs

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env node
22
import { spawn } from 'node:child_process';
33

4+
const SUPPORTS_PROCESS_GROUP_SIGNALS =
5+
process.platform !== 'win32' && process.platform !== 'cygwin';
6+
47
const MANIFEST_WAIT_TARGETS = [
58
'tcp:3009',
69
'tcp:3012',
@@ -248,19 +251,31 @@ function sendSignal(proc, signal) {
248251
return;
249252
}
250253

254+
if (SUPPORTS_PROCESS_GROUP_SIGNALS) {
255+
try {
256+
process.kill(-proc.pid, signal);
257+
return;
258+
} catch (error) {
259+
if (
260+
error.code !== 'ESRCH' &&
261+
error.code !== 'EPERM' &&
262+
error.code !== 'ERR_INVALID_ARG_VALUE'
263+
) {
264+
throw error;
265+
}
266+
}
267+
}
268+
251269
try {
252-
process.kill(-proc.pid, signal);
270+
proc.kill(signal);
253271
} catch (error) {
254-
if (error.code !== 'ESRCH' && error.code !== 'EPERM') {
272+
if (
273+
error.code !== 'ESRCH' &&
274+
error.code !== 'EPERM' &&
275+
error.code !== 'ERR_INVALID_ARG_VALUE'
276+
) {
255277
throw error;
256278
}
257-
try {
258-
proc.kill(signal);
259-
} catch (innerError) {
260-
if (innerError.code !== 'ESRCH') {
261-
throw innerError;
262-
}
263-
}
264279
}
265280
}
266281

0 commit comments

Comments
 (0)