Skip to content

Commit 71d1377

Browse files
committed
add some more treatment for exit codes
1 parent af8111c commit 71d1377

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/render/integrations/integrations.spec.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,15 @@ const startWebServer = async (command: string, url: string, cwd: string) => {
6060
stdio: 'pipe',
6161
});
6262

63-
process.on('exit', () => {
64-
child.kill();
65-
});
63+
process.on('exit', () => child.kill());
6664

67-
process.on('SIGINT', () => {
68-
child.kill('SIGINT');
65+
process.on('SIGINT', () => child.kill('SIGINT'));
66+
67+
process.on('SIGUSR1', () => child.kill('SIGUSR1'));
68+
process.on('SIGUSR2', () => child.kill('SIGUSR1'));
69+
process.on('uncaughtException', (error) => {
70+
console.error(error);
71+
child.kill();
6972
});
7073

7174
await waitForServer(url, 30_000);

0 commit comments

Comments
 (0)