mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
pnpm devでCtrl+Cで終了させてもプロセスが完全に殺せないのを修正 (#10914)
This commit is contained in:
parent
a80003cde5
commit
7cbd852fe5
@ -44,11 +44,17 @@ const fs = require('fs');
|
||||
if (!stat) throw new Error('not exist yet');
|
||||
if (stat.size === 0) throw new Error('not built yet');
|
||||
|
||||
await execa('pnpm', ['start'], {
|
||||
const subprocess = await execa('pnpm', ['start'], {
|
||||
cwd: __dirname + '/../',
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
|
||||
// なぜかworkerだけが終了してmasterが残るのでその対策
|
||||
process.on('SIGINT', () => {
|
||||
subprocess.kill('SIGINT');
|
||||
process.exit(0);
|
||||
});
|
||||
} catch (e) {
|
||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
||||
start();
|
||||
|
Loading…
Reference in New Issue
Block a user