From 25e49e10166ae786883f2a58394d796724b0c109 Mon Sep 17 00:00:00 2001 From: Primiano Tucci Date: Fri, 17 Jan 2025 17:27:06 +0000 Subject: [PATCH] ui: run-dev-server, kill more aggressively on Ctrl-C Bug: 388734468 Change-Id: If3149cae1593605e9b60fd1e746aaf200bee04cb --- ui/build.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/build.js b/ui/build.js index c44277a0d4..30aca5489b 100644 --- a/ui/build.js +++ b/ui/build.js @@ -209,8 +209,9 @@ async function main() { process.on('SIGINT', () => { console.log('\nSIGINT received. Killing all child processes and exiting'); for (const proc of subprocesses) { - if (proc) proc.kill('SIGINT'); + if (proc) proc.kill('SIGKILL'); } + process.kill(0, 'SIGKILL'); // Kill the whole process group. process.exit(130); // 130 -> Same behavior of bash when killed by SIGINT. });